gov.sandia.cognition.learning.data.feature
Class MultivariateDecorrelator.DiagonalCovarianceLearner

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.data.feature.MultivariateDecorrelator.DiagonalCovarianceLearner
All Implemented Interfaces:
BatchLearner<Collection<? extends Vectorizable>,MultivariateDecorrelator>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
MultivariateDecorrelator

public static class MultivariateDecorrelator.DiagonalCovarianceLearner
extends AbstractCloneableSerializable
implements BatchLearner<Collection<? extends Vectorizable>,MultivariateDecorrelator>

The DiagonalCovarianceLearner class implements a BatchLearner object for a MultivariateDecorrelator.

See Also:
Serialized Form

Field Summary
static double DEFAULT_DEFAULT_COVARIANCE
          The default value for default covariance is 1.0E-5.
protected  double defaultCovariance
          The default covariance.
 
Constructor Summary
MultivariateDecorrelator.DiagonalCovarianceLearner()
          Creates a new MultivariateDecorrelator.DiagonalCovarianceLearner with the default value for default covariance.
MultivariateDecorrelator.DiagonalCovarianceLearner(double defaultCovariance)
          Creates a new MultivariateDecorrelator.DiagonalCovarianceLearner with the given value for default covariance.
 
Method Summary
 double getDefaultCovariance()
          Gets the default covariance value.
 MultivariateDecorrelator learn(Collection<? extends Vectorizable> values)
          Learns a MultivariateDecorrelator from the given values by computing the mean and variance for each dimension separately.
 void setDefaultCovariance(double defaultCovariance)
          Sets the default covariance value.
 
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.util.CloneableSerializable
clone
 

Field Detail

DEFAULT_DEFAULT_COVARIANCE

public static final double DEFAULT_DEFAULT_COVARIANCE
The default value for default covariance is 1.0E-5.

See Also:
Constant Field Values

defaultCovariance

protected double defaultCovariance
The default covariance. Added to the diagonal to prevent it from becoming singular.

Constructor Detail

MultivariateDecorrelator.DiagonalCovarianceLearner

public MultivariateDecorrelator.DiagonalCovarianceLearner()
Creates a new MultivariateDecorrelator.DiagonalCovarianceLearner with the default value for default covariance.


MultivariateDecorrelator.DiagonalCovarianceLearner

public MultivariateDecorrelator.DiagonalCovarianceLearner(double defaultCovariance)
Creates a new MultivariateDecorrelator.DiagonalCovarianceLearner with the given value for default covariance.

Parameters:
defaultCovariance - The default covariance value. Added to the diagonal to prevent it from becoming singular
Method Detail

learn

public MultivariateDecorrelator learn(Collection<? extends Vectorizable> values)
Learns a MultivariateDecorrelator from the given values by computing the mean and variance for each dimension separately.

Specified by:
learn in interface BatchLearner<Collection<? extends Vectorizable>,MultivariateDecorrelator>
Parameters:
values - The values to use.
Returns:
The MultivariateDecorrelator computed from the given values with a diagonal covariance matrix.

getDefaultCovariance

public double getDefaultCovariance()
Gets the default covariance value. It is added to the diagonal terms of the covariance matrix to attempt to prevent them from becoming singular.

Returns:
The default covariance value.

setDefaultCovariance

public void setDefaultCovariance(double defaultCovariance)
Sets the default covariance value. It is added to the diagonal terms of the covariance matrix to attempt to prevent them from becoming singular.

Parameters:
defaultCovariance - The default covariance value. Must be non-negative.