gov.sandia.cognition.statistics.bayesian.conjugate
Class AbstractConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType extends ClosedFormDistribution<ObservationType>,BeliefType extends ClosedFormDistribution<ParameterType>>

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<ObservationType,ParameterType,ConditionalType,BeliefType>
Type Parameters:
ObservationType - Observations from the ConditionalType that are used to estimate the parameters of the distribution.
BeliefType - Type of Distribution that represents uncertainty in the parameters.
ParameterType - Type of parameter estimated by this algorithm, which is used to parameterize the conditional distribution.
ConditionalType - Type of conditional distribution that generates observations for this relationship.
All Implemented Interfaces:
BatchAndIncrementalLearner<ObservationType,BeliefType>, BatchLearner<Collection<? extends ObservationType>,BeliefType>, IncrementalLearner<ObservationType,BeliefType>, BayesianEstimator<ObservationType,ParameterType,BeliefType>, ConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType,BeliefType>, RecursiveBayesianEstimator<ObservationType,ParameterType,BeliefType>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
BernoulliBayesianEstimator, BinomialBayesianEstimator, ExponentialBayesianEstimator, GammaInverseScaleBayesianEstimator, MultinomialBayesianEstimator, MultivariateGaussianMeanBayesianEstimator, MultivariateGaussianMeanCovarianceBayesianEstimator, PoissonBayesianEstimator, UniformDistributionBayesianEstimator, UnivariateGaussianMeanBayesianEstimator, UnivariateGaussianMeanVarianceBayesianEstimator

public abstract class AbstractConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType extends ClosedFormDistribution<ObservationType>,BeliefType extends ClosedFormDistribution<ParameterType>>
extends AbstractBatchAndIncrementalLearner<ObservationType,BeliefType>
implements ConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType,BeliefType>

Partial implementation of ConjugatePriorBayesianEstimator that contains a initial belief (prior) distribution function.

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

Field Summary
protected  BayesianParameter<ParameterType,ConditionalType,BeliefType> parameter
          Bayesian hyperparameter relationship between the conditional distribution and the conjugate prior distribution.
 
Constructor Summary
AbstractConjugatePriorBayesianEstimator(BayesianParameter<ParameterType,ConditionalType,BeliefType> parameter)
          Creates a new instance of AbstractConjugatePriorBayesianEstimator
 
Method Summary
 AbstractConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType,BeliefType> clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 ConditionalType createConditionalDistribution(ParameterType parameter)
          Creates an instance of the class conditional distribution, parameterized by the given parameter value.
 BeliefType createInitialLearnedObject()
          Creates a new initial learned object, before any data is given.
 BeliefType getInitialBelief()
          Getter for initialBelief.
 BayesianParameter<ParameterType,ConditionalType,BeliefType> getParameter()
          Gets the Bayesian hyperparameter relationship between the conditional distribution and the conjugate prior distribution.
protected  void setParameter(BayesianParameter<ParameterType,ConditionalType,BeliefType> parameter)
          Setter for parameter
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner
learn, learn, update
 
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
computeEquivalentSampleSize, createParameter
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
update, update
 

Field Detail

parameter

protected BayesianParameter<ParameterType,ConditionalType extends ClosedFormDistribution<ObservationType>,BeliefType extends ClosedFormDistribution<ParameterType>> parameter
Bayesian hyperparameter relationship between the conditional distribution and the conjugate prior distribution.

Constructor Detail

AbstractConjugatePriorBayesianEstimator

public AbstractConjugatePriorBayesianEstimator(BayesianParameter<ParameterType,ConditionalType,BeliefType> parameter)
Creates a new instance of AbstractConjugatePriorBayesianEstimator

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

clone

public AbstractConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType,BeliefType> 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 AbstractBatchAndIncrementalLearner<ObservationType,BeliefType extends ClosedFormDistribution<ParameterType>>
Returns:
A clone of this object.

createInitialLearnedObject

public BeliefType createInitialLearnedObject()
Description copied from interface: IncrementalLearner
Creates a new initial learned object, before any data is given.

Specified by:
createInitialLearnedObject in interface IncrementalLearner<ObservationType,BeliefType extends ClosedFormDistribution<ParameterType>>
Returns:
The initial learned object.

createConditionalDistribution

public ConditionalType createConditionalDistribution(ParameterType 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<ObservationType,ParameterType,ConditionalType extends ClosedFormDistribution<ObservationType>,BeliefType extends ClosedFormDistribution<ParameterType>>
Parameters:
parameter - Parameter used to create the class conditional distribution.
Returns:
Parameterized class conditional distribution.

getInitialBelief

public BeliefType getInitialBelief()
Getter for initialBelief.

Returns:
Initial belief distribution of the parameters.

getParameter

public BayesianParameter<ParameterType,ConditionalType,BeliefType> getParameter()
Description copied from interface: ConjugatePriorBayesianEstimator
Gets the Bayesian hyperparameter relationship between the conditional distribution and the conjugate prior distribution.

Specified by:
getParameter in interface ConjugatePriorBayesianEstimator<ObservationType,ParameterType,ConditionalType extends ClosedFormDistribution<ObservationType>,BeliefType extends ClosedFormDistribution<ParameterType>>
Returns:
Bayesian hyperparameter relationship between the conditional distribution and the conjugate prior distribution.

setParameter

protected void setParameter(BayesianParameter<ParameterType,ConditionalType,BeliefType> parameter)
Setter for parameter

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