public class AttributeFilter extends BaseDatasetFilter
Usage: <Target Attribute> <Criteria> <Threshold>
Modifier and Type | Field and Description |
---|---|
protected boolean |
Equal
Should entries with Feature==Threshold be kept?
|
protected boolean |
GreaterThan
Should entries with Feature < Threshold be kept?
|
protected boolean |
LessThan
Should entries with Feature > Threshold be kept?
|
protected java.lang.String |
TargetAttribute
Name of feature to base filter on
|
protected double |
Threshold
Threshold value
|
Constructor and Description |
---|
AttributeFilter() |
Modifier and Type | Method and Description |
---|---|
protected boolean[] |
label(Dataset D)
Given a dataset, determine which entries passes the filter.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setOptions(java.util.List<java.lang.Object> OptionsObj)
Set any options for this object.
|
void |
setOptions(java.lang.String TargetFeature,
java.lang.String Criteria,
java.lang.String Threshold)
Configure the filter by defining which entries should be kept
|
protected boolean[] |
testCriteria(double[] value)
Evaluate the filtering criteria on each member of an array
|
void |
train(Dataset TrainingSet)
Train a dataset splitter, if necessary
|
filter, parallelLabel, parallelMinimum, setExclude, toExclude
protected java.lang.String TargetAttribute
protected double Threshold
protected boolean Equal
protected boolean GreaterThan
protected boolean LessThan
public void setOptions(java.util.List<java.lang.Object> OptionsObj) throws java.lang.Exception
Options
OptionsObj
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
public void setOptions(java.lang.String TargetFeature, java.lang.String Criteria, java.lang.String Threshold)
TargetFeature
- Which feature to filterCriteria
- Criteria used to test for inclusionThreshold
- Threshold used to test for inclusionprotected boolean[] testCriteria(double[] value)
value
- Values to be testedprotected boolean[] label(Dataset D)
BaseDatasetFilter
label
in class BaseDatasetFilter
D
- Dataset to be labeledpublic void train(Dataset TrainingSet)
BaseDatasetFilter
train
in class BaseDatasetFilter
TrainingSet
- Dataset to use for training