gov.sandia.cognition.statistics.bayesian.conjugate
Class MultivariateGaussianMeanBayesianEstimator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner<ObservationType,BeliefType>
          extended by gov.sandia.cognition.statistics.bayesian.conjugate.AbstractConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>
              extended by gov.sandia.cognition.statistics.bayesian.conjugate.MultivariateGaussianMeanBayesianEstimator
All Implemented Interfaces:
BatchAndIncrementalLearner<Vector,MultivariateGaussian>, BatchLearner<Collection<? extends Vector>,MultivariateGaussian>, IncrementalLearner<Vector,MultivariateGaussian>, BayesianEstimator<Vector,Vector,MultivariateGaussian>, BayesianEstimatorPredictor<Vector,Vector,MultivariateGaussian>, ConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>, ConjugatePriorBayesianEstimatorPredictor<Vector,Vector,MultivariateGaussian,MultivariateGaussian>, RecursiveBayesianEstimator<Vector,Vector,MultivariateGaussian>, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author="William M. Bolstad",
                      title="Introduction to Bayesian Statistics: Second Edition",
                      type=Book,
                      year=2007,
                      pages=208)
public class MultivariateGaussianMeanBayesianEstimator
extends AbstractConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>
implements ConjugatePriorBayesianEstimatorPredictor<Vector,Vector,MultivariateGaussian,MultivariateGaussian>

Bayesian estimator for the mean of a MultivariateGaussian using its conjugate prior, which is also a MultivariateGaussian. This estimation method assumes that the covariance matrix of the estimated mean is known.

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Nested Class Summary
static class MultivariateGaussianMeanBayesianEstimator.Parameter
          Parameter of this conjugate prior relationship.
 
Field Summary
static int DEFAULT_DIMENSIONALITY
          Default dimensionality, 1.
 
Fields inherited from class gov.sandia.cognition.statistics.bayesian.conjugate.AbstractConjugatePriorBayesianEstimator
parameter
 
Constructor Summary
  MultivariateGaussianMeanBayesianEstimator()
          Creates a new instance of MultivariateGaussianMeanBayesianEstimator
protected MultivariateGaussianMeanBayesianEstimator(BayesianParameter<Vector,MultivariateGaussian,MultivariateGaussian> parameter)
          Creates a new instance
  MultivariateGaussianMeanBayesianEstimator(int dimensionality)
          Creates a new instance of MultivariateGaussianMeanBayesianEstimator
  MultivariateGaussianMeanBayesianEstimator(Matrix knownCovarianceInverse)
          Creates a new instance of MultivariateGaussianMeanBayesianEstimator
  MultivariateGaussianMeanBayesianEstimator(Matrix knownCovarianceInverse, MultivariateGaussian belief)
          Creates a new instance of MultivariateGaussianMeanBayesianEstimator
  MultivariateGaussianMeanBayesianEstimator(MultivariateGaussian conditional, MultivariateGaussian prior)
          Creates a new instance of PoissonBayesianEstimator
 
Method Summary
 double computeEquivalentSampleSize(MultivariateGaussian belief)
          Computes the equivalent sample size of using the given prior.
 MultivariateGaussian createConditionalDistribution(Vector parameter)
          Creates an instance of the class conditional distribution, parameterized by the given parameter value.
 MultivariateGaussianMeanBayesianEstimator.Parameter createParameter(MultivariateGaussian conditional, MultivariateGaussian prior)
          Creates a parameter linking the conditional and prior distributions
 MultivariateGaussian createPredictiveDistribution(MultivariateGaussian posterior)
          Creates the predictive distribution of new data given the posterior.
 Matrix getKnownCovarianceInverse()
          Getter for knownCovarianceInverse.
 void setKnownCovarianceInverse(Matrix knownCovarianceInverse)
          Setter for knownCovarianceInverse.
 void update(MultivariateGaussian target, Iterable<? extends Vector> data)
          The update method updates an object of ResultType using the given new Iterable containing some number of type DataType, using some form of "learning" algorithm.
 void update(MultivariateGaussian updater, Vector data)
          The update method updates an object of ResultType using the given new data of type DataType, using some form of "learning" algorithm.
 
Methods inherited from class gov.sandia.cognition.statistics.bayesian.conjugate.AbstractConjugatePriorBayesianEstimator
clone, createInitialLearnedObject, getInitialBelief, getParameter, setParameter
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner
learn, learn
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.statistics.bayesian.conjugate.ConjugatePriorBayesianEstimator
getParameter
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
createInitialLearnedObject
 

Field Detail

DEFAULT_DIMENSIONALITY

public static final int DEFAULT_DIMENSIONALITY
Default dimensionality, 1.

See Also:
Constant Field Values
Constructor Detail

MultivariateGaussianMeanBayesianEstimator

public MultivariateGaussianMeanBayesianEstimator()
Creates a new instance of MultivariateGaussianMeanBayesianEstimator


MultivariateGaussianMeanBayesianEstimator

public MultivariateGaussianMeanBayesianEstimator(int dimensionality)
Creates a new instance of MultivariateGaussianMeanBayesianEstimator

Parameters:
dimensionality - Dimensionality of the Vectors

MultivariateGaussianMeanBayesianEstimator

public MultivariateGaussianMeanBayesianEstimator(Matrix knownCovarianceInverse)
Creates a new instance of MultivariateGaussianMeanBayesianEstimator

Parameters:
knownCovarianceInverse - Known covariance matrix of the estimated mean.

MultivariateGaussianMeanBayesianEstimator

public MultivariateGaussianMeanBayesianEstimator(Matrix knownCovarianceInverse,
                                                 MultivariateGaussian belief)
Creates a new instance of MultivariateGaussianMeanBayesianEstimator

Parameters:
knownCovarianceInverse - Known covariance matrix inverse of the estimated mean. Sometimes called the "precision matrix".
belief - Belief distribution of the mean.

MultivariateGaussianMeanBayesianEstimator

public MultivariateGaussianMeanBayesianEstimator(MultivariateGaussian conditional,
                                                 MultivariateGaussian prior)
Creates a new instance of PoissonBayesianEstimator

Parameters:
prior - Default conjugate prior.
conditional - Conditional distribution of the conjugate prior.

MultivariateGaussianMeanBayesianEstimator

protected MultivariateGaussianMeanBayesianEstimator(BayesianParameter<Vector,MultivariateGaussian,MultivariateGaussian> parameter)
Creates a new instance

Parameters:
parameter - Bayesian hyperparameter relationship between the conditional distribution and the conjugate prior distribution.
Method Detail

createParameter

public MultivariateGaussianMeanBayesianEstimator.Parameter createParameter(MultivariateGaussian conditional,
                                                                           MultivariateGaussian prior)
Description copied from interface: ConjugatePriorBayesianEstimator
Creates a parameter linking the conditional and prior distributions

Specified by:
createParameter in interface ConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>
Parameters:
conditional - Distribution from which observations are generated
prior - Distribution that generates parameters for the conditional
Returns:
Parameter describing the relationship between the conditional and prior

getKnownCovarianceInverse

public Matrix getKnownCovarianceInverse()
Getter for knownCovarianceInverse.

Returns:
Known covariance matrix inverse of the estimated mean. Sometimes called the "precision matrix".

setKnownCovarianceInverse

public void setKnownCovarianceInverse(Matrix knownCovarianceInverse)
Setter for knownCovarianceInverse.

Parameters:
knownCovarianceInverse - Known covariance matrix inverse of the estimated mean. Sometimes called the "precision matrix".

update

public void update(MultivariateGaussian target,
                   Iterable<? extends Vector> data)
Description copied from interface: IncrementalLearner
The update method updates an object of ResultType using the given new Iterable containing some number of type DataType, using some form of "learning" algorithm.

Specified by:
update in interface IncrementalLearner<Vector,MultivariateGaussian>
Overrides:
update in class AbstractBatchAndIncrementalLearner<Vector,MultivariateGaussian>
Parameters:
target - The object to update.
data - The Iterable containing data for the learning algorithm to use to update the object.

update

public void update(MultivariateGaussian updater,
                   Vector data)
Description copied from interface: IncrementalLearner
The update method updates an object of ResultType using the given new data of type DataType, using some form of "learning" algorithm.

Specified by:
update in interface IncrementalLearner<Vector,MultivariateGaussian>
Parameters:
updater - The object to update.
data - The new data for the learning algorithm to use to update the object.

computeEquivalentSampleSize

public double computeEquivalentSampleSize(MultivariateGaussian belief)
Description copied from interface: ConjugatePriorBayesianEstimator
Computes the equivalent sample size of using the given prior. This is effectively how many samples of bias the prior injects into the estimate.

Specified by:
computeEquivalentSampleSize in interface ConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>
Parameters:
belief - Prior belief to measure.
Returns:
Equivalent sample size of the initial belief.

createPredictiveDistribution

public MultivariateGaussian createPredictiveDistribution(MultivariateGaussian posterior)
Description copied from interface: BayesianEstimatorPredictor
Creates the predictive distribution of new data given the posterior. This is equivalent to evaluating the integral of: p( newdata | data ) = integral( conditional( newdata | data, parameters ) * p( parameters | data ) dparameters )

Specified by:
createPredictiveDistribution in interface BayesianEstimatorPredictor<Vector,Vector,MultivariateGaussian>
Parameters:
posterior - Posterior distribution from which to compute the predictive posterior.
Returns:
Predictive distribution of new data given the observed data.

createConditionalDistribution

public MultivariateGaussian createConditionalDistribution(Vector parameter)
Description copied from interface: ConjugatePriorBayesianEstimator
Creates an instance of the class conditional distribution, parameterized by the given parameter value. This is the distribution that we implicitly draw observation samples from.

Specified by:
createConditionalDistribution in interface ConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>
Overrides:
createConditionalDistribution in class AbstractConjugatePriorBayesianEstimator<Vector,Vector,MultivariateGaussian,MultivariateGaussian>
Parameters:
parameter - Parameter used to create the class conditional distribution.
Returns:
Parameterized class conditional distribution.