gov.sandia.cognition.statistics.distribution
Class BetaDistribution.MomentMatchingEstimator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.distribution.BetaDistribution.MomentMatchingEstimator
All Implemented Interfaces:
BatchLearner<Collection<? extends Double>,BetaDistribution>, DistributionEstimator<Double,BetaDistribution>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
BetaDistribution

@PublicationReference(author={"Andrew Gelman","John B. Carlin","Hal S. Stern","Donald B. Rubin"},
                      title="Bayesian Data Analysis, Second Edition",
                      type=Book,
                      year=2004,
                      pages=582,
                      notes="Equation A.3")
public static class BetaDistribution.MomentMatchingEstimator
extends AbstractCloneableSerializable
implements DistributionEstimator<Double,BetaDistribution>

Estimates the parameters of a Beta distribution using the matching of moments, not maximum likelihood.

See Also:
Serialized Form

Constructor Summary
BetaDistribution.MomentMatchingEstimator()
          Default constructor
 
Method Summary
 BetaDistribution learn(Collection<? extends Double> data)
          The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.
static BetaDistribution learn(double mean, double variance)
          Computes the Beta distribution describes by the given moments
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

BetaDistribution.MomentMatchingEstimator

public BetaDistribution.MomentMatchingEstimator()
Default constructor

Method Detail

learn

public BetaDistribution learn(Collection<? extends Double> data)
Description copied from interface: BatchLearner
The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.

Specified by:
learn in interface BatchLearner<Collection<? extends Double>,BetaDistribution>
Parameters:
data - The data that the learning algorithm will use to create an object of ResultType.
Returns:
The object that is created based on the given data using the learning algorithm.

learn

public static BetaDistribution learn(double mean,
                                     double variance)
Computes the Beta distribution describes by the given moments

Parameters:
mean - Mean of the distribution
variance - Variance of the distribution
Returns:
Beta distribution that has the same mean/variance as the given parameters.