gov.sandia.cognition.learning.function.categorization
Class AbstractConfidenceWeightedBinaryCategorizer

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<Vectorizable>
              extended by gov.sandia.cognition.learning.function.categorization.LinearBinaryCategorizer
                  extended by gov.sandia.cognition.learning.function.categorization.AbstractConfidenceWeightedBinaryCategorizer
All Implemented Interfaces:
Evaluator<Vectorizable,Boolean>, BinaryCategorizer<Vectorizable>, Categorizer<Vectorizable,Boolean>, ConfidenceWeightedBinaryCategorizer, DiscriminantBinaryCategorizer<Vectorizable>, DiscriminantCategorizer<Vectorizable,Boolean,Double>, ThresholdBinaryCategorizer<Vectorizable>, VectorInputEvaluator<Vectorizable,Boolean>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
DefaultConfidenceWeightedBinaryCategorizer, DiagonalConfidenceWeightedBinaryCategorizer

public abstract class AbstractConfidenceWeightedBinaryCategorizer
extends LinearBinaryCategorizer
implements ConfidenceWeightedBinaryCategorizer

Unit tests for class AbstractConfidenceWeightedBinaryCategorizer.

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

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.function.categorization.LinearBinaryCategorizer
DEFAULT_BIAS
 
Fields inherited from class gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer
BINARY_CATEGORIES
 
Constructor Summary
AbstractConfidenceWeightedBinaryCategorizer()
          Creates a new, uninitialized AbstractConfidenceWeightedBinaryCategorizer.
AbstractConfidenceWeightedBinaryCategorizer(Vector mean)
          Creates a new AbstractConfidenceWeightedBinaryCategorizer with the given mean vector.
 
Method Summary
 MultivariateGaussian createWeightDistribution()
          Creates a multivariate Gaussian distribution that represents the distribution of weight vectors that the algorithm has learned.
 BernoulliDistribution evaluateAsBernoulli(Vectorizable input)
          Returns a Bernoulli distribution over the output of the distribution of weight vectors times the input, with the confidence that the categorizer was trained using.
 Vector getMean()
          Gets the mean of the categorizer, which is the weight vector.
 boolean isInitialized()
          Determines if this category has been initialized with a mean and covariance.
 void setMean(Vector mean)
          Sets the mean of the categorizer, which is the weight vector.
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.LinearBinaryCategorizer
clone, evaluateAsDouble, evaluateAsDouble, getBias, getInputDimensionality, getThreshold, getWeights, setBias, setThreshold, setWeights, toString
 
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 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.ConfidenceWeightedBinaryCategorizer
evaluateAsGaussian, getCovariance
 
Methods inherited from interface gov.sandia.cognition.math.matrix.VectorInputEvaluator
getInputDimensionality
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.ThresholdBinaryCategorizer
getThreshold, setThreshold
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.DiscriminantBinaryCategorizer
evaluateAsDouble
 
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
 

Constructor Detail

AbstractConfidenceWeightedBinaryCategorizer

public AbstractConfidenceWeightedBinaryCategorizer()
Creates a new, uninitialized AbstractConfidenceWeightedBinaryCategorizer.


AbstractConfidenceWeightedBinaryCategorizer

public AbstractConfidenceWeightedBinaryCategorizer(Vector mean)
Creates a new AbstractConfidenceWeightedBinaryCategorizer with the given mean vector.

Parameters:
mean - The mean vector.
Method Detail

evaluateAsBernoulli

public BernoulliDistribution evaluateAsBernoulli(Vectorizable input)
Description copied from interface: ConfidenceWeightedBinaryCategorizer
Returns a Bernoulli distribution over the output of the distribution of weight vectors times the input, with the confidence that the categorizer was trained using.

Specified by:
evaluateAsBernoulli in interface ConfidenceWeightedBinaryCategorizer
Parameters:
input - The input to evaluate.
Returns:
The distribution over outputs as a Bernoulli.

isInitialized

public boolean isInitialized()
Description copied from interface: ConfidenceWeightedBinaryCategorizer
Determines if this category has been initialized with a mean and covariance.

Specified by:
isInitialized in interface ConfidenceWeightedBinaryCategorizer
Returns:
True if this categorizer has been initialized. Otherwise, false.

createWeightDistribution

public MultivariateGaussian createWeightDistribution()
Description copied from interface: ConfidenceWeightedBinaryCategorizer
Creates a multivariate Gaussian distribution that represents the distribution of weight vectors that the algorithm has learned.

Specified by:
createWeightDistribution in interface ConfidenceWeightedBinaryCategorizer
Returns:
The distribution of weight vectors.

getMean

public Vector getMean()
Gets the mean of the categorizer, which is the weight vector.

Specified by:
getMean in interface ConfidenceWeightedBinaryCategorizer
Returns:
The mean of the categorizer.

setMean

public void setMean(Vector mean)
Sets the mean of the categorizer, which is the weight vector.

Parameters:
mean - The mean of the categorizer.