gov.sandia.cognition.statistics
Interface DataDistribution<DataType>

Type Parameters:
DataType - The type of data stored at the indices, the hash keys.
All Superinterfaces:
Cloneable, CloneableSerializable, ComputableDistribution<DataType>, DiscreteDistribution<DataType>, Distribution<DataType>, EstimableDistribution<DataType,DataDistribution<DataType>>, NumericMap<DataType>, ScalarMap<DataType>, Serializable
All Known Subinterfaces:
DataDistribution.PMF<KeyType>
All Known Implementing Classes:
AbstractDataDistribution, DataCountTreeSetBinnedMapHistogram, DefaultDataDistribution, DefaultDataDistribution.PMF, ScalarDataDistribution, ScalarDataDistribution.CDF, ScalarDataDistribution.PMF

public interface DataDistribution<DataType>
extends DiscreteDistribution<DataType>, EstimableDistribution<DataType,DataDistribution<DataType>>, ScalarMap<DataType>

A distribution of data from which we can sample and perform Ring operations.

Since:
3.3.1
Author:
Justin Basilico, Kevin R. Dixon

Nested Class Summary
static interface DataDistribution.PMF<KeyType>
          Interface for the probability mass function (PMF) of a data distribution.
 
Nested classes/interfaces inherited from interface gov.sandia.cognition.collection.ScalarMap
ScalarMap.Entry<KeyType>
 
Method Summary
 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.
 
Methods inherited from interface gov.sandia.cognition.statistics.DiscreteDistribution
getDomain, getDomainSize
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 
Methods inherited from interface gov.sandia.cognition.collection.ScalarMap
asMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, getMaxValue, getMinValue, increment, increment, incrementAll, incrementAll, set, setAll
 
Methods inherited from interface gov.sandia.cognition.collection.NumericMap
clear, containsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, size
 

Method Detail

clone

DataDistribution<DataType> clone()
Description copied from interface: CloneableSerializable
Creates a new clone (shallow copy) of this object.

Specified by:
clone in interface CloneableSerializable
Returns:
A new clone (shallow copy) of this object.

toInfiniteVector

InfiniteVector<DataType> toInfiniteVector()
Converts this data distribution to an infinite vector.

Returns:
A new InfiniteVector with values from this data distribution.

fromInfiniteVector

void fromInfiniteVector(InfiniteVector<? extends DataType> vector)
Replaces the entries in this data distribution with the entries in the given infinite vector.

Parameters:
vector - The infinite vector to use to populate this data distribution.

getEntropy

double getEntropy()
Computes the information-theoretic entropy of the vector in bits.

Returns:
Entropy in bits of the distribution.

getFraction

double getFraction(DataType key)
Gets the fraction of the counts represented by the given key.

Parameters:
key - The key.
Returns:
The fraction of the total count represented by the key, if it exists. Otherwise, 0.0.

getLogFraction

double getLogFraction(DataType key)
Gets the natural logarithm of the fraction of the counts represented by the given key.

Parameters:
key - Key to consider
Returns:
Natural logarithm of the fraction of the counts represented by the key

getTotal

double getTotal()
Gets the total (sum) of the values in the distribution.

Returns:
The sum of the values in the distribution.

getEstimator

DistributionEstimator<DataType,? extends DataDistribution<DataType>> getEstimator()
Description copied from interface: EstimableDistribution
Gets an estimator associated with this distribution.

Specified by:
getEstimator in interface EstimableDistribution<DataType,DataDistribution<DataType>>
Returns:
A distribution estimator associated for this distribution.

getProbabilityFunction

DataDistribution.PMF<DataType> getProbabilityFunction()
Description copied from interface: ComputableDistribution
Gets the distribution function associated with this Distribution, either the PDF or PMF.

Specified by:
getProbabilityFunction in interface ComputableDistribution<DataType>
Specified by:
getProbabilityFunction in interface DiscreteDistribution<DataType>
Returns:
Distribution function associated with this Distribution.