gov.sandia.cognition.statistics.distribution
Class MultivariateGaussian.SufficientStatisticCovarianceInverse

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractSufficientStatistic<Vector,MultivariateGaussian>
          extended by gov.sandia.cognition.statistics.distribution.MultivariateGaussian.SufficientStatisticCovarianceInverse
All Implemented Interfaces:
Factory<MultivariateGaussian>, SufficientStatistic<Vector,MultivariateGaussian>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
MultivariateGaussian

@PublicationReference(author="Wikipedia",
                      title="Sherman\u2013Morrison formula",
                      type=WebPage,
                      year=2011,
                      url="http://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_formula")
public static class MultivariateGaussian.SufficientStatisticCovarianceInverse
extends AbstractSufficientStatistic<Vector,MultivariateGaussian>

Implements the sufficient statistics of the MultivariateGaussian while estimating the inverse of the covariance matrix. This is only slightly more computationally intensive than estimating the covariance directly, but does not require a single matrix inversion. This is useful when it's the covariance inverse ("precision") that you're interested in.

See Also:
Serialized Form

Field Summary
static double DEFAULT_COVARIANCE_INVERSE
          Default covariance of the statistics, 99999.99999999999.
protected  double defaultCovarianceInverse
          Default covariance inverse of the distribution
 
Fields inherited from class gov.sandia.cognition.statistics.AbstractSufficientStatistic
count
 
Constructor Summary
MultivariateGaussian.SufficientStatisticCovarianceInverse()
          Default constructor
MultivariateGaussian.SufficientStatisticCovarianceInverse(double defaultCovarianceInverse)
          Creates a new instance of SufficientStatisticCovarianceInverse
 
Method Summary
 void clear()
          Resets this set of sufficient statistics to its empty state.
 MultivariateGaussian.SufficientStatisticCovarianceInverse clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 MultivariateGaussian.PDF create()
          Creates a new instance of an object.
 void create(MultivariateGaussian distribution)
          Modifies the given distribution with the parameters indicated by the sufficient statistics
 Matrix getCovarianceInverse()
          Gets the covariance Inverse of the Gaussian.
 double getDefaultCovarianceInverse()
          Getter for defaultCovarianceInverse
 Vector getMean()
          Getter for mean
 Matrix getSumSquaredDifferencesInverse()
          Getter for sumSquaredDifferences
 void setDefaultCovariance(double defaultCovarianceInverse)
          Setter for defaultCovarianceInverse
 void update(Vector value)
          Updates the sufficient statistics from the given value
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractSufficientStatistic
getCount, setCount, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COVARIANCE_INVERSE

public static final double DEFAULT_COVARIANCE_INVERSE
Default covariance of the statistics, 99999.99999999999.

See Also:
Constant Field Values

defaultCovarianceInverse

protected double defaultCovarianceInverse
Default covariance inverse of the distribution

Constructor Detail

MultivariateGaussian.SufficientStatisticCovarianceInverse

public MultivariateGaussian.SufficientStatisticCovarianceInverse()
Default constructor


MultivariateGaussian.SufficientStatisticCovarianceInverse

public MultivariateGaussian.SufficientStatisticCovarianceInverse(double defaultCovarianceInverse)
Creates a new instance of SufficientStatisticCovarianceInverse

Parameters:
defaultCovarianceInverse - Default covariance inverse of the distribution
Method Detail

clone

public MultivariateGaussian.SufficientStatisticCovarianceInverse clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractSufficientStatistic<Vector,MultivariateGaussian>
Returns:
A clone of this object.

clear

public void clear()
Resets this set of sufficient statistics to its empty state.


update

public void update(Vector value)
Description copied from interface: SufficientStatistic
Updates the sufficient statistics from the given value

Parameters:
value - Value to update the sufficient statistics

create

public MultivariateGaussian.PDF create()
Description copied from interface: Factory
Creates a new instance of an object.

Returns:
A newly created object.

create

public void create(MultivariateGaussian distribution)
Description copied from interface: SufficientStatistic
Modifies the given distribution with the parameters indicated by the sufficient statistics

Parameters:
distribution - Distribution to modify by side effect

getDefaultCovarianceInverse

public double getDefaultCovarianceInverse()
Getter for defaultCovarianceInverse

Returns:
Default covariance Inverse of the distribution

setDefaultCovariance

public void setDefaultCovariance(double defaultCovarianceInverse)
Setter for defaultCovarianceInverse

Parameters:
defaultCovarianceInverse - Default covariance Inverse of the distribution

getMean

public Vector getMean()
Getter for mean

Returns:
The mean of the Gaussian

getSumSquaredDifferencesInverse

public Matrix getSumSquaredDifferencesInverse()
Getter for sumSquaredDifferences

Returns:
This is the sum-squared differences

getCovarianceInverse

public Matrix getCovarianceInverse()
Gets the covariance Inverse of the Gaussian.

Returns:
The covariance.