public class ClassFilter extends BaseDatasetFilter
Usage: <measured|predicted> <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 double |
Threshold
Threshold value
|
protected boolean |
UseMeasured
Whether to use measured class variable
|
Constructor and Description |
---|
ClassFilter() |
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 |
setComparisonOperator(java.lang.String operator)
Define comparison operator.
|
void |
setOptions(java.util.List<java.lang.Object> OptionsObj)
Set any options for this object.
|
void |
setOptions(java.lang.String Measured,
java.lang.String Criteria,
java.lang.String Threshold)
Configure the filter by defining which entries should be kept
|
void |
setThreshold(double Threshold)
Set the comparison threshold.
|
void |
setUseMeasured(boolean value)
Set whether to use the measured class variable.
|
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 boolean UseMeasured
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 setThreshold(double Threshold)
Threshold
- Desired thresholdpublic void setComparisonOperator(java.lang.String operator) throws java.lang.Exception
operator
- Desired operatorjava.lang.Exception
public void setUseMeasured(boolean value)
value
- Desired settingpublic void setOptions(java.lang.String Measured, java.lang.String Criteria, java.lang.String Threshold) throws java.lang.Exception
Measured
- Should be either measured or predictedCriteria
- Criteria used to test for inclusionThreshold
- Threshold used to test for inclusionjava.lang.Exception
protected 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