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

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Number>
              extended by gov.sandia.cognition.statistics.distribution.BetaBinomialDistribution
                  extended by gov.sandia.cognition.statistics.distribution.BetaBinomialDistribution.PMF
All Implemented Interfaces:
Evaluator<Number,Double>, Vectorizable, ClosedFormComputableDistribution<Number>, ClosedFormDiscreteUnivariateDistribution<Number>, ClosedFormDistribution<Number>, ClosedFormUnivariateDistribution<Number>, ComputableDistribution<Number>, DiscreteDistribution<Number>, Distribution<Number>, DistributionWithMean<Number>, EstimableDistribution<Number,BetaBinomialDistribution>, ProbabilityFunction<Number>, ProbabilityMassFunction<Number>, UnivariateDistribution<Number>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
BetaBinomialDistribution

public static class BetaBinomialDistribution.PMF
extends BetaBinomialDistribution
implements ProbabilityMassFunction<Number>

PMF of the BetaBinomialDistribution

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.BetaBinomialDistribution
BetaBinomialDistribution.CDF, BetaBinomialDistribution.MomentMatchingEstimator, BetaBinomialDistribution.PMF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.BetaBinomialDistribution
DEFAULT_N, DEFAULT_SCALE, DEFAULT_SHAPE, n, scale, shape
 
Constructor Summary
BetaBinomialDistribution.PMF()
          Creates a new instance of BetaBinomialDistribution
BetaBinomialDistribution.PMF(BetaBinomialDistribution other)
          Copy constructor
BetaBinomialDistribution.PMF(int n, double shape, double scale)
          Creates a new instance of BetaBinomialDistribution
 
Method Summary
 Double evaluate(Number input)
          Evaluates the function on the given input and returns the output.
 double getEntropy()
          Gets the entropy of the values in the histogram.
 BetaBinomialDistribution.PMF getProbabilityFunction()
          Gets the distribution function associated with this Distribution, either the PDF or PMF.
 double logEvaluate(Number input)
          Evaluate the natural logarithm of the distribution function.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.BetaBinomialDistribution
clone, convertFromVector, convertToVector, getCDF, getDomain, getDomainSize, getEstimator, getMaxSupport, getMean, getMinSupport, getN, getScale, getShape, getVariance, sample, setN, setScale, setShape
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
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.DiscreteDistribution
getDomain, getDomainSize
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

BetaBinomialDistribution.PMF

public BetaBinomialDistribution.PMF()
Creates a new instance of BetaBinomialDistribution


BetaBinomialDistribution.PMF

public BetaBinomialDistribution.PMF(int n,
                                    double shape,
                                    double scale)
Creates a new instance of BetaBinomialDistribution

Parameters:
shape - Shape, similar to the beta parameter shape, must be greater than zero
scale - Scale, similar to the beta parameter scale, must be greater than zero
n - Number of observations, similar to the Binomial N, must be greater than zero

BetaBinomialDistribution.PMF

public BetaBinomialDistribution.PMF(BetaBinomialDistribution other)
Copy constructor

Parameters:
other - BetaBinomialDistribution to copy
Method Detail

getProbabilityFunction

public BetaBinomialDistribution.PMF getProbabilityFunction()
Description copied from interface: ComputableDistribution
Gets the distribution function associated with this Distribution, either the PDF or PMF.

Specified by:
getProbabilityFunction in interface ComputableDistribution<Number>
Specified by:
getProbabilityFunction in interface DiscreteDistribution<Number>
Specified by:
getProbabilityFunction in interface ProbabilityMassFunction<Number>
Overrides:
getProbabilityFunction in class BetaBinomialDistribution
Returns:
Distribution function associated with this Distribution.

evaluate

public Double evaluate(Number input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Number,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

logEvaluate

public double logEvaluate(Number input)
Description copied from interface: ProbabilityFunction
Evaluate the natural logarithm of the distribution function. This is sometimes more efficient than evaluating the distribution function itself, and when evaluating the product of many independent or exchangeable samples.

Specified by:
logEvaluate in interface ProbabilityFunction<Number>
Returns:
Natural logarithm of the distribution function.

getEntropy

public double getEntropy()
Description copied from interface: ProbabilityMassFunction
Gets the entropy of the values in the histogram.

Specified by:
getEntropy in interface ProbabilityMassFunction<Number>
Returns:
The entropy of the values in the histogram.