gov.sandia.cognition.statistics.bayesian
Class BayesianLinearRegression.IncrementalEstimator.SufficientStatistic

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractSufficientStatistic<InputOutputPair<? extends Vectorizable,Double>,MultivariateGaussian>
          extended by gov.sandia.cognition.statistics.bayesian.BayesianLinearRegression.IncrementalEstimator.SufficientStatistic
All Implemented Interfaces:
Factory<MultivariateGaussian>, SufficientStatistic<InputOutputPair<? extends Vectorizable,Double>,MultivariateGaussian>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
BayesianLinearRegression.IncrementalEstimator

public class BayesianLinearRegression.IncrementalEstimator.SufficientStatistic
extends AbstractSufficientStatistic<InputOutputPair<? extends Vectorizable,Double>,MultivariateGaussian>

SufficientStatistic for incremental Bayesian linear regression

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.AbstractSufficientStatistic
count
 
Constructor Summary
BayesianLinearRegression.IncrementalEstimator.SufficientStatistic(MultivariateGaussian prior)
          Creates a new instance of SufficientStatistic
 
Method Summary
 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()
          Getter for covarianceInverse
 int getDimensionality()
          Gets the dimensionality of the underlying Gaussian
 Vector getMean()
          Computes the mean of the Gaussian, but involves a matrix inversion and multiplication, so it's expensive.
 Vector getZ()
          Getter for z
 void update(InputOutputPair<? extends Vectorizable,Double> value)
          Updates the sufficient statistics from the given value
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractSufficientStatistic
clone, getCount, setCount, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BayesianLinearRegression.IncrementalEstimator.SufficientStatistic

public BayesianLinearRegression.IncrementalEstimator.SufficientStatistic(MultivariateGaussian prior)
Creates a new instance of SufficientStatistic

Parameters:
prior - Prior on the weights
Method Detail

update

public void update(InputOutputPair<? extends Vectorizable,Double> 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

getCovarianceInverse

public Matrix getCovarianceInverse()
Getter for covarianceInverse

Returns:
Covariance inverse, sometimes called "precision"

getZ

public Vector getZ()
Getter for z

Returns:
"z" statistic, proportional to the mean

getMean

public Vector getMean()
Computes the mean of the Gaussian, but involves a matrix inversion and multiplication, so it's expensive.

Returns:
Mean of the Gaussian.

getDimensionality

public int getDimensionality()
Gets the dimensionality of the underlying Gaussian

Returns:
Dimensionality of the underlying Gaussian