public static class NegativeBinomialDistribution.PMF extends NegativeBinomialDistribution implements ProbabilityMassFunction<java.lang.Number>
NegativeBinomialDistribution.CDF, NegativeBinomialDistribution.MaximumLikelihoodEstimator, NegativeBinomialDistribution.PMF, NegativeBinomialDistribution.WeightedMaximumLikelihoodEstimator
DEFAULT_P, DEFAULT_R, p, r
Constructor and Description |
---|
PMF()
Creates a new instance of PMF
|
PMF(double r,
double p)
Creates a new instance of PMF
|
PMF(NegativeBinomialDistribution other)
Copy constructor
|
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.
|
NegativeBinomialDistribution.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, getP, getR, getVariance, sampleAsInt, sampleInto, sampleInto, setP, setR, toString
sampleAsInts
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDomain, getDomainSize
sample, sample, sampleInto
clone
public PMF()
public PMF(double r, double p)
r
- Number of trials before the experiment is stopped,
must be greater than zero.p
- Probability of a positive outcome (Bernoulli probability), [0,1]public PMF(NegativeBinomialDistribution other)
other
- NegativeBinomialDistribution to copypublic NegativeBinomialDistribution.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 NegativeBinomialDistribution
public double getEntropy()
ProbabilityMassFunction
getEntropy
in interface ProbabilityMassFunction<java.lang.Number>
public double logEvaluate(java.lang.Number input)
ProbabilityFunction
logEvaluate
in interface ProbabilityFunction<java.lang.Number>
input
- The input to be evaluatedpublic java.lang.Double evaluate(java.lang.Number input)
Evaluator