public static class BetaBinomialDistribution.PMF extends BetaBinomialDistribution implements ProbabilityMassFunction<java.lang.Number>
BetaBinomialDistribution.CDF, BetaBinomialDistribution.MomentMatchingEstimator, BetaBinomialDistribution.PMF
DEFAULT_N, DEFAULT_SCALE, DEFAULT_SHAPE, n, scale, shape
Constructor and Description |
---|
PMF()
Creates a new instance of BetaBinomialDistribution
|
PMF(BetaBinomialDistribution other)
Copy constructor
|
PMF(int n,
double shape,
double scale)
Creates a new instance of BetaBinomialDistribution
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluate(java.lang.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(java.lang.Number input)
Evaluate the natural logarithm of the distribution function.
|
clone, convertFromVector, convertToVector, getCDF, getDomain, getDomainSize, getEstimator, getMaxSupport, getMean, getMeanAsDouble, getMinSupport, getN, getScale, getShape, getVariance, sampleAsInt, sampleInto, sampleInto, setN, setScale, setShape
sampleAsInts
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomain, getDomainSize
sample, sample, sampleInto
clone
public PMF()
public PMF(int n, double shape, double scale)
shape
- Shape, similar to the beta parameter shape, must be greater than zeroscale
- Scale, similar to the beta parameter scale, must be greater than zeron
- Number of observations, similar to the Binomial N,
must be greater than zeropublic PMF(BetaBinomialDistribution other)
other
- BetaBinomialDistribution to copypublic BetaBinomialDistribution.PMF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<java.lang.Number>
getProbabilityFunction
in interface DiscreteDistribution<java.lang.Number>
getProbabilityFunction
in interface ProbabilityMassFunction<java.lang.Number>
getProbabilityFunction
in class BetaBinomialDistribution
public java.lang.Double evaluate(java.lang.Number input)
Evaluator
public double logEvaluate(java.lang.Number input)
ProbabilityFunction
logEvaluate
in interface ProbabilityFunction<java.lang.Number>
input
- The input to be evaluatedpublic double getEntropy()
ProbabilityMassFunction
getEntropy
in interface ProbabilityMassFunction<java.lang.Number>