org.encog.util.normalize.segregate
Class IntegerBalanceSegregator
- java.lang.Object
-
- org.encog.util.normalize.segregate.IntegerBalanceSegregator
-
- All Implemented Interfaces:
- java.io.Serializable, Segregator
public class IntegerBalanceSegregator extends java.lang.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
Constructors Constructor and Description IntegerBalanceSegregator()Default constructor.IntegerBalanceSegregator(InputField target, int count)Construct an integer balance segregator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringdumpCounts()intgetCount()DataNormalizationgetNormalization()java.util.Map<java.lang.Integer,java.lang.Integer>getRunningCounts()InputFieldgetTarget()voidinit(DataNormalization normalization)Init the segregator with the owning normalization object.voidpassInit()Init for a new pass.booleanshouldInclude()Determine of the current row should be included.
-
-
-
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 java.lang.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:
getNormalizationin interfaceSegregator- Returns:
- The normalization object used with this segregator.
-
getRunningCounts
public java.util.Map<java.lang.Integer,java.lang.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:
initin interfaceSegregator- Parameters:
normalization- The data normalization object to use.
-
passInit
public void passInit()
Init for a new pass.- Specified by:
passInitin interfaceSegregator
-
shouldInclude
public boolean shouldInclude()
Determine of the current row should be included.- Specified by:
shouldIncludein interfaceSegregator- Returns:
- True if the current row should be included.
-
-
DMelt 3.0 © DataMelt by jWork.ORG