gov.sandia.cognition.learning.function.categorization
Class AbstractDiscriminantBinaryCategorizer<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>
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>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
AbstractThresholdBinaryCategorizer, KernelBinaryCategorizer, LinearBinaryCategorizer, WeightedBinaryEnsemble

public abstract class AbstractDiscriminantBinaryCategorizer<InputType>
extends AbstractBinaryCategorizer<InputType>
implements DiscriminantBinaryCategorizer<InputType>

An abstract implementation of the DiscriminantBinaryCategorizer interface. Provides implementations of the evaluate and evaluateWithDiscriminant that call evaluateAsDouble and uses the sign as the category and the magnitude as the discriminant.

Since:
3.1
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer
BINARY_CATEGORIES
 
Constructor Summary
AbstractDiscriminantBinaryCategorizer()
          Creates a new AbstractDiscriminantBinaryCategorizer.
 
Method Summary
 Boolean evaluate(InputType input)
          Evaluates the function on the given input and returns the output.
 ValueDiscriminantPair<Boolean,Double> evaluateWithDiscriminant(InputType input)
          Evaluate the categorizer on the given input to produce the expected category plus a discriminant for later producing an ordering of how well items fit into that category.
 
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.DiscriminantBinaryCategorizer
evaluateAsDouble
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.Categorizer
getCategories
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

AbstractDiscriminantBinaryCategorizer

public AbstractDiscriminantBinaryCategorizer()
Creates a new AbstractDiscriminantBinaryCategorizer.

Method Detail

evaluate

public Boolean evaluate(InputType input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<InputType,Boolean>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

evaluateWithDiscriminant

public ValueDiscriminantPair<Boolean,Double> evaluateWithDiscriminant(InputType input)
Description copied from interface: DiscriminantCategorizer
Evaluate the categorizer on the given input to produce the expected category plus a discriminant for later producing an ordering of how well items fit into that category.

Specified by:
evaluateWithDiscriminant in interface DiscriminantCategorizer<InputType,Boolean,Double>
Parameters:
input - The input value to categorize with a discriminate
Returns:
A pair containing the value and the discriminant value used for ordering results belonging to the same category.