gov.sandia.cognition.learning.function.categorization
Class AbstractThresholdBinaryCategorizer<InputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer<InputType>
          extended by gov.sandia.cognition.learning.function.categorization.AbstractDiscriminantBinaryCategorizer<InputType>
              extended by gov.sandia.cognition.learning.function.categorization.AbstractThresholdBinaryCategorizer<InputType>
Type Parameters:
InputType - The type of the input the categorizer can use.
All Implemented Interfaces:
Evaluator<InputType,Boolean>, BinaryCategorizer<InputType>, Categorizer<InputType,Boolean>, DiscriminantBinaryCategorizer<InputType>, DiscriminantCategorizer<InputType,Boolean,Double>, ThresholdBinaryCategorizer<InputType>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
ScalarFunctionToBinaryCategorizerAdapter, ScalarThresholdBinaryCategorizer, VectorElementThresholdCategorizer

public abstract class AbstractThresholdBinaryCategorizer<InputType>
extends AbstractDiscriminantBinaryCategorizer<InputType>
implements ThresholdBinaryCategorizer<InputType>

Categorizer that first maps the input space onto a real value, then uses a threshold to map the result onto lowValue (for strictly less than the threshold) or highValue (for greater than or equal to the threshold).

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static double DEFAULT_THRESHOLD
          Default threshold, 0.0.
 
Fields inherited from class gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer
BINARY_CATEGORIES
 
Constructor Summary
AbstractThresholdBinaryCategorizer(double threshold)
          Creates a new AbstractThresholdBinaryCategorizer
 
Method Summary
 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
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.AbstractDiscriminantBinaryCategorizer
evaluate, evaluateWithDiscriminant
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer
getCategories
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.DiscriminantCategorizer
evaluateWithDiscriminant
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.Categorizer
getCategories
 
Methods inherited from interface gov.sandia.cognition.evaluator.Evaluator
evaluate
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

DEFAULT_THRESHOLD

public static final double DEFAULT_THRESHOLD
Default threshold, 0.0.

See Also:
Constant Field Values
Constructor Detail

AbstractThresholdBinaryCategorizer

public AbstractThresholdBinaryCategorizer(double threshold)
Creates a new AbstractThresholdBinaryCategorizer

Parameters:
threshold - Threshold, below which I will return lowValue, above or equal to I will return highValue.
Method Detail

evaluateWithoutThreshold

protected abstract double evaluateWithoutThreshold(InputType input)
Computes the discriminant. This maps the input space onto the real line, which will then be passed to the threshold.

Parameters:
input - Input to map onto the real number line.
Returns:
Real-value equivalent of the input.

evaluateAsDouble

public double evaluateAsDouble(InputType input)
Description copied from interface: DiscriminantBinaryCategorizer
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. Zero can be treated as unknown or as the true category, depending on the categorizer.

Specified by:
evaluateAsDouble in interface DiscriminantBinaryCategorizer<InputType>
Parameters:
input - The input value to categorize.
Returns:
The categorization of the input value where the sign is the categorization.

getThreshold

public double getThreshold()
Getter for threshold

Specified by:
getThreshold in interface ThresholdBinaryCategorizer<InputType>
Returns:
Threshold, below which I will return lowValue, above or equal to I will return highValue.

setThreshold

public void setThreshold(double threshold)
Setter for threshold

Specified by:
setThreshold in interface ThresholdBinaryCategorizer<InputType>
Parameters:
threshold - Threshold, below which I will return lowValue, above or equal to I will return highValue.