org.encog.util.normalize.segregate
Class IntegerBalanceSegregator

java.lang.Object
  extended by org.encog.util.normalize.segregate.IntegerBalanceSegregator
All Implemented Interfaces:
Serializable, Segregator

public class IntegerBalanceSegregator
extends Object
implements Segregator

Balance based on an input value. This allows you to make sure that one input class does not saturate the training data. To do this, you specify the input value to check and the number of occurrences of each integer value of this field to allow.

See Also:
Serialized Form

Constructor Summary
IntegerBalanceSegregator()
          Default constructor.
IntegerBalanceSegregator(InputField target, int count)
          Construct an integer balance segregator.
 
Method Summary
 String dumpCounts()
           
 int getCount()
           
 DataNormalization getNormalization()
           
 Map<Integer,Integer> getRunningCounts()
           
 InputField getTarget()
           
 void init(DataNormalization normalization)
          Init the segregator with the owning normalization object.
 void passInit()
          Init for a new pass.
 boolean shouldInclude()
          Determine of the current row should be included.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerBalanceSegregator

public IntegerBalanceSegregator(InputField target,
                                int count)
Construct an integer balance segregator.

Parameters:
target - The input field to use.
count - The number of each unique integer to allow.

IntegerBalanceSegregator

public IntegerBalanceSegregator()
Default constructor.

Method Detail

dumpCounts

public String dumpCounts()
Returns:
A string that contains the counts for each group.

getCount

public int getCount()
Returns:
The amout of data allowed by this segregator.

getNormalization

public DataNormalization getNormalization()
Specified by:
getNormalization in interface Segregator
Returns:
The normalization object used with this segregator.

getRunningCounts

public Map<Integer,Integer> getRunningCounts()
Returns:
The current count for each group.

getTarget

public InputField getTarget()
Returns:
The input field being used.

init

public void init(DataNormalization normalization)
Init the segregator with the owning normalization object.

Specified by:
init in interface Segregator
Parameters:
normalization - The data normalization object to use.

passInit

public void passInit()
Init for a new pass.

Specified by:
passInit in interface Segregator

shouldInclude

public boolean shouldInclude()
Determine of the current row should be included.

Specified by:
shouldInclude in interface Segregator
Returns:
True if the current row should be included.


Copyright © 2014. All Rights Reserved.