DataType - The type of data stored at the indices, the hash keys.public interface DataDistribution<DataType> extends DiscreteDistribution<DataType>, EstimableDistribution<DataType,DataDistribution<DataType>>, ScalarMap<DataType>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DataDistribution.PMF<KeyType>
Interface for the probability mass function (PMF) of a data distribution.
|
ScalarMap.Entry<KeyType>| Modifier and Type | Method and Description |
|---|---|
DataDistribution<DataType> |
clone()
Creates a new clone (shallow copy) of this object.
|
void |
fromInfiniteVector(InfiniteVector<? extends DataType> vector)
Replaces the entries in this data distribution with the entries in the
given infinite vector.
|
double |
getEntropy()
Computes the information-theoretic entropy of the vector in bits.
|
DistributionEstimator<DataType,? extends DataDistribution<DataType>> |
getEstimator()
Gets an estimator associated with this distribution.
|
double |
getFraction(DataType key)
Gets the fraction of the counts represented by the given key.
|
double |
getLogFraction(DataType key)
Gets the natural logarithm of the fraction of the counts represented
by the given key.
|
DataDistribution.PMF<DataType> |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
getTotal()
Gets the total (sum) of the values in the distribution.
|
InfiniteVector<DataType> |
toInfiniteVector()
Converts this data distribution to an infinite vector.
|
getDomain, getDomainSizesample, sample, sampleIntoasMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, getMaxValue, getMinValue, increment, increment, incrementAll, incrementAll, set, setAll, setAllclear, containsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, sizeDataDistribution<DataType> clone()
CloneableSerializableclone in interface CloneableSerializableInfiniteVector<DataType> toInfiniteVector()
InfiniteVector with values from this data
distribution.void fromInfiniteVector(InfiniteVector<? extends DataType> vector)
vector - The infinite vector to use to populate this data distribution.double getEntropy()
double getFraction(DataType key)
key - The key.double getLogFraction(DataType key)
key - Key to considerdouble getTotal()
DistributionEstimator<DataType,? extends DataDistribution<DataType>> getEstimator()
EstimableDistributiongetEstimator in interface EstimableDistribution<DataType,DataDistribution<DataType>>DataDistribution.PMF<DataType> getProbabilityFunction()
ComputableDistributiongetProbabilityFunction in interface ComputableDistribution<DataType>getProbabilityFunction in interface DiscreteDistribution<DataType>