org.encog.util.normalize.segregate
Class RangeSegregator
- java.lang.Object
-
- org.encog.util.normalize.segregate.RangeSegregator
-
- All Implemented Interfaces:
- java.io.Serializable, Segregator
public class RangeSegregator extends java.lang.Object implements Segregator
Range segregators are used to segregate data and include or exclude if it is within a certain range.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RangeSegregator()Default constructor for reflection.RangeSegregator(InputField sourceField, boolean include)Construct a range segregator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddRange(double low, double high, boolean include)Add a range.voidaddRange(SegregationRange range)Add a range.DataNormalizationgetNormalization()InputFieldgetSourceField()voidinit(DataNormalization normalization)Init the object.voidpassInit()Nothing needs to be done to setup for a pass.booleanshouldInclude()Should this row be included, according to this segregator.
-
-
-
Constructor Detail
-
RangeSegregator
public RangeSegregator()
Default constructor for reflection.
-
RangeSegregator
public RangeSegregator(InputField sourceField, boolean include)
Construct a range segregator.- Parameters:
sourceField- The source field.include- Default action, if the data is not in any of the ranges, should it be included.
-
-
Method Detail
-
addRange
public void addRange(double low, double high, boolean include)Add a range.- Parameters:
low- The low end of the range.high- The high end of the range.include- Should this range be included.
-
addRange
public void addRange(SegregationRange range)
Add a range.- Parameters:
range- The range to add.
-
getNormalization
public DataNormalization getNormalization()
- Specified by:
getNormalizationin interfaceSegregator- Returns:
- The normalization object used by this object.
-
getSourceField
public InputField getSourceField()
- Returns:
- The source field that the ranges are compared against.
-
init
public void init(DataNormalization normalization)
Init the object.- Specified by:
initin interfaceSegregator- Parameters:
normalization- The normalization object that owns this range.
-
shouldInclude
public boolean shouldInclude()
Description copied from interface:SegregatorShould this row be included, according to this segregator.- Specified by:
shouldIncludein interfaceSegregator- Returns:
- True if the current row should be included according to this segregator.
-
passInit
public void passInit()
Nothing needs to be done to setup for a pass.- Specified by:
passInitin interfaceSegregator
-
-
DMelt 3.0 © DataMelt by jWork.ORG