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

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<Double,Double,GammaDistribution,GammaDistribution>
              extended by gov.sandia.cognition.statistics.bayesian.conjugate.GammaInverseScaleBayesianEstimator
All Implemented Interfaces:
BatchAndIncrementalLearner<Double,GammaDistribution>, BatchLearner<Collection<? extends Double>,GammaDistribution>, IncrementalLearner<Double,GammaDistribution>, BayesianEstimator<Double,Double,GammaDistribution>, ConjugatePriorBayesianEstimator<Double,Double,GammaDistribution,GammaDistribution>, RecursiveBayesianEstimator<Double,Double,GammaDistribution>, CloneableSerializable, Serializable, Cloneable

public class GammaInverseScaleBayesianEstimator
extends AbstractConjugatePriorBayesianEstimator<Double,Double,GammaDistribution,GammaDistribution>

A Bayesian estimator for the scale parameter of a Gamma distribution using the conjugate prior Gamma distribution for the inverse-scale (rate) of the Gamma.

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

Nested Class Summary
static class GammaInverseScaleBayesianEstimator.Parameter
          Bayesian parameter describing this conjugate relationship.
 
Field Summary
static double DEFAULT_SHAPE
          Default shape, 1.0.
 
Fields inherited from class gov.sandia.cognition.statistics.bayesian.conjugate.AbstractConjugatePriorBayesianEstimator
parameter
 
Constructor Summary
  GammaInverseScaleBayesianEstimator()
          Creates a new instance of GammaInverseScaleBayesianEstimator
protected GammaInverseScaleBayesianEstimator(BayesianParameter<Double,GammaDistribution,GammaDistribution> parameter)
          Creates a new instance of GammaInverseScaleBayesianEstimator
  GammaInverseScaleBayesianEstimator(double shape, GammaDistribution prior)
          Creates a new instance of GammaInverseScaleBayesianEstimator
  GammaInverseScaleBayesianEstimator(GammaDistribution conditional, GammaDistribution prior)
          Creates a new instance of GammaInverseScaleBayesianEstimator
 
Method Summary
 double computeEquivalentSampleSize(GammaDistribution belief)
          Computes the equivalent sample size of using the given prior.
 GammaInverseScaleBayesianEstimator.Parameter createParameter(GammaDistribution conditional, GammaDistribution prior)
          Creates a parameter linking the conditional and prior distributions
 double getShape()
          Gets the shape of the conditional distribution
 void setShape(double shape)
          Sets the shape of the conditional distribution
 void update(GammaDistribution belief, Double 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, createConditionalDistribution, createInitialLearnedObject, getInitialBelief, getParameter, setParameter
 
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.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
update
 

Field Detail

DEFAULT_SHAPE

public static final double DEFAULT_SHAPE
Default shape, 1.0.

See Also:
Constant Field Values
Constructor Detail

GammaInverseScaleBayesianEstimator

public GammaInverseScaleBayesianEstimator()
Creates a new instance of GammaInverseScaleBayesianEstimator


GammaInverseScaleBayesianEstimator

public GammaInverseScaleBayesianEstimator(double shape,
                                          GammaDistribution prior)
Creates a new instance of GammaInverseScaleBayesianEstimator

Parameters:
shape - Shape of the conditional distribution
prior - Default conjugate prior.

GammaInverseScaleBayesianEstimator

public GammaInverseScaleBayesianEstimator(GammaDistribution conditional,
                                          GammaDistribution prior)
Creates a new instance of GammaInverseScaleBayesianEstimator

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

GammaInverseScaleBayesianEstimator

protected GammaInverseScaleBayesianEstimator(BayesianParameter<Double,GammaDistribution,GammaDistribution> parameter)
Creates a new instance of GammaInverseScaleBayesianEstimator

Parameters:
parameter - Bayesian parameter describing this conjugate relationship.
Method Detail

createParameter

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

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

getShape

public double getShape()
Gets the shape of the conditional distribution

Returns:
Shape of the conditional distribution

setShape

public void setShape(double shape)
Sets the shape of the conditional distribution

Parameters:
shape - Shape of the conditional distribution

update

public void update(GammaDistribution belief,
                   Double 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.

Parameters:
belief - The object to update.
data - The new data for the learning algorithm to use to update the object.

computeEquivalentSampleSize

public double computeEquivalentSampleSize(GammaDistribution 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.

Parameters:
belief - Prior belief to measure.
Returns:
Equivalent sample size of the initial belief.