public static class ScalarDataDistribution.PMF extends ScalarDataDistribution implements DataDistribution.PMF<java.lang.Double>
ScalarDataDistribution.CDF, ScalarDataDistribution.Estimator, ScalarDataDistribution.PMF
DefaultDataDistribution.DefaultFactory<DataType>, DefaultDataDistribution.WeightedEstimator<KeyType>
AbstractMutableDoubleMap.Entry<KeyType>, AbstractMutableDoubleMap.SimpleEntry<KeyType>, AbstractMutableDoubleMap.SimpleEntrySet<KeyType>, AbstractMutableDoubleMap.SimpleIterator<KeyType>
DataDistribution.PMF<KeyType>
ScalarMap.Entry<KeyType>
DEFAULT_INITIAL_CAPACITY, total
map
Constructor and Description |
---|
PMF()
Default constructor
|
PMF(java.lang.Iterable<? extends java.lang.Number> data)
Creates a new instance of PMF
|
PMF(ScalarDataDistribution other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluate(java.lang.Double input)
Evaluates the function on the given input and returns the output.
|
ScalarDataDistribution.PMF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
logEvaluate(java.lang.Double input)
Evaluate the natural logarithm of the distribution function.
|
clone, getCDF, getEstimator, getMaxSupport, getMean, getMeanAsDouble, getMinSupport, getVariance
clear, getMeanValue, getTotal, increment, set
fromInfiniteVector, getDomain, getDomainSize, getEntropy, getFraction, getLogFraction, getMaxValue, getMinValue, sample, sample, sampleInto, toInfiniteVector
asMap, compact, entrySet, get
containsKey, decrement, decrement, decrementAll, decrementAll, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, increment, incrementAll, incrementAll, isEmpty, keySet, setAll, setAll, size
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, fromInfiniteVector, getEntropy, getEstimator, getFraction, getLogFraction, getTotal, toInfiniteVector
asMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, getMaxValue, getMinValue, increment, increment, incrementAll, incrementAll, set, setAll, setAll
clear, containsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, size
getEntropy
getDomain, getDomainSize
sample, sample, sampleInto
public PMF()
public PMF(ScalarDataDistribution other)
other
- ScalarDataDistribution to copypublic PMF(java.lang.Iterable<? extends java.lang.Number> data)
data
- Data used to create the PMFpublic double logEvaluate(java.lang.Double input)
ProbabilityFunction
logEvaluate
in interface ProbabilityFunction<java.lang.Double>
input
- The input to be evaluatedpublic java.lang.Double evaluate(java.lang.Double input)
Evaluator
public ScalarDataDistribution.PMF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<java.lang.Double>
getProbabilityFunction
in interface DataDistribution<java.lang.Double>
getProbabilityFunction
in interface DiscreteDistribution<java.lang.Double>
getProbabilityFunction
in interface ProbabilityMassFunction<java.lang.Double>
getProbabilityFunction
in class ScalarDataDistribution