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

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
                      extended by gov.sandia.cognition.learning.function.categorization.DiagonalConfidenceWeightedBinaryCategorizer
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

public class DiagonalConfidenceWeightedBinaryCategorizer
extends AbstractConfidenceWeightedBinaryCategorizer

A confidence-weighted linear predictor with a diagonal covariance, which is stored as a vector.

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

Field Summary
protected  Vector variance
          The variance values, which is the diagonal of the covariance matrix.
 
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
DiagonalConfidenceWeightedBinaryCategorizer()
          Creates a new DiagonalConfidenceWeightedBinaryCategorizer.
 
Method Summary
 UnivariateGaussian evaluateAsGaussian(Vectorizable input)
          Returns the univariate Gaussian distribution over the output of the distribution of weight vectors times the input, with the confidence that the categorizer was trained using.
 DiagonalMatrix getCovariance()
          Gets the covariance matrix of the categorizer.
 Vector getVariance()
          Gets the variance vector.
 boolean isInitialized()
          Determines if this category has been initialized with a mean and covariance.
 void setVariance(Vector variance)
          Sets the variance vector.
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.AbstractConfidenceWeightedBinaryCategorizer
createWeightDistribution, evaluateAsBernoulli, getMean, setMean
 
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.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
 

Field Detail

variance

protected Vector variance
The variance values, which is the diagonal of the covariance matrix. It is stored as a vector to avoid needing to instantiate and use matrix operations with it.

Constructor Detail

DiagonalConfidenceWeightedBinaryCategorizer

public DiagonalConfidenceWeightedBinaryCategorizer()
Creates a new DiagonalConfidenceWeightedBinaryCategorizer.

Method Detail

evaluateAsGaussian

public UnivariateGaussian evaluateAsGaussian(Vectorizable input)
Description copied from interface: ConfidenceWeightedBinaryCategorizer
Returns the univariate Gaussian distribution over the output of the distribution of weight vectors times the input, with the confidence that the categorizer was trained using.

Parameters:
input - The input to evaluate.
Returns:
The distribution of outputs as a Gaussian.

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
Overrides:
isInitialized in class AbstractConfidenceWeightedBinaryCategorizer
Returns:
True if this categorizer has been initialized. Otherwise, false.

getCovariance

public DiagonalMatrix getCovariance()
Description copied from interface: ConfidenceWeightedBinaryCategorizer
Gets the covariance matrix of the categorizer.

Returns:
The covariance matrix.

getVariance

public Vector getVariance()
Gets the variance vector. Used as the diagonal of the covariance matrix.

Returns:
The variance vector.

setVariance

public void setVariance(Vector variance)
Sets the variance vector. Used as the diagonal of the covariance matrix.

Parameters:
variance - The variance vector.