public static class GeometricDistribution.PMF extends GeometricDistribution implements ProbabilityMassFunction<java.lang.Number>
GeometricDistribution.CDF, GeometricDistribution.MaximumLikelihoodEstimator, GeometricDistribution.PMF
DEFAULT_P, p
Constructor and Description |
---|
PMF()
Creates a new instance of GeometricDistribution
|
PMF(double p)
Creates a new instance of GeometricDistribution
|
PMF(GeometricDistribution 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.
|
GeometricDistribution.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, getVariance, sampleAsInt, sampleInto, setP
sampleAsInts, sampleInto
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomain, getDomainSize
sample, sample, sampleInto
clone
public PMF()
public PMF(double p)
p
- Probability of a positive outcome (Bernoulli probability), [0,1]public PMF(GeometricDistribution other)
other
- GeometricDistribution to copypublic 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
public GeometricDistribution.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 GeometricDistribution