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

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

@PublicationReference(author={"Ram C. Tripathi","Ramesh C. Gupta","John Gurland"},
                      title="Estimation of parameters in the beta binomial model",
                      type=Journal,
                      publication="Annals of the Institute of Statistical Mathematics",
                      year=1994,
                      pages={317,331},
                      notes="Equation 2.11")
public static class BetaBinomialDistribution.MomentMatchingEstimator
extends AbstractCloneableSerializable
implements DistributionEstimator<Number,BetaBinomialDistribution>

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

See Also:
Serialized Form

Constructor Summary
BetaBinomialDistribution.MomentMatchingEstimator()
          Default constructor
 
Method Summary
 BetaBinomialDistribution learn(Collection<? extends Number> data)
          The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.
static BetaBinomialDistribution.PMF learn(int N, double mean, double variance)
          Computes the Beta-Binomial 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

BetaBinomialDistribution.MomentMatchingEstimator

public BetaBinomialDistribution.MomentMatchingEstimator()
Default constructor

Method Detail

learn

public BetaBinomialDistribution learn(Collection<? extends Number> 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 Number>,BetaBinomialDistribution>
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 BetaBinomialDistribution.PMF learn(int N,
                                                 double mean,
                                                 double variance)
Computes the Beta-Binomial distribution describes by the given moments

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