InputType
- The type of the input the categorizer can use.public abstract class AbstractThresholdBinaryCategorizer<InputType> extends AbstractDiscriminantBinaryCategorizer<InputType> implements ThresholdBinaryCategorizer<InputType>
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_THRESHOLD
Default threshold, 0.0.
|
BINARY_CATEGORIES
Constructor and Description |
---|
AbstractThresholdBinaryCategorizer(double threshold)
Creates a new AbstractThresholdBinaryCategorizer
|
Modifier and Type | Method and Description |
---|---|
double |
evaluateAsDouble(InputType input)
Categorizes the given input vector as a double where values greater than
zero are in the true category and less than zero are in the false
category.
|
protected abstract double |
evaluateWithoutThreshold(InputType input)
Computes the discriminant.
|
double |
getThreshold()
Getter for threshold
|
void |
setThreshold(double threshold)
Setter for threshold
|
evaluate, evaluateWithDiscriminant
getCategories
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluateWithDiscriminant
getCategories
clone
public static final double DEFAULT_THRESHOLD
public AbstractThresholdBinaryCategorizer(double threshold)
threshold
- Threshold, below which I will return lowValue, above or equal to I will
return highValue.protected abstract double evaluateWithoutThreshold(InputType input)
input
- Input to map onto the real number line.public double evaluateAsDouble(InputType input)
DiscriminantBinaryCategorizer
evaluateAsDouble
in interface DiscriminantBinaryCategorizer<InputType>
input
- The input value to categorize.public double getThreshold()
getThreshold
in interface ThresholdBinaryCategorizer<InputType>
public void setThreshold(double threshold)
setThreshold
in interface ThresholdBinaryCategorizer<InputType>
threshold
- Threshold, below which I will return lowValue, above or equal to I will
return highValue.