gov.sandia.cognition.statistics.distribution
Class ScalarDataDistribution.PMF

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.collection.AbstractScalarMap<KeyType>
          extended by gov.sandia.cognition.collection.AbstractMutableDoubleMap<KeyType>
              extended by gov.sandia.cognition.statistics.AbstractDataDistribution<KeyType>
                  extended by gov.sandia.cognition.statistics.distribution.DefaultDataDistribution<Double>
                      extended by gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
                          extended by gov.sandia.cognition.statistics.distribution.ScalarDataDistribution.PMF
All Implemented Interfaces:
NumericMap<Double>, ScalarMap<Double>, Evaluator<Double,Double>, ComputableDistribution<Double>, DataDistribution<Double>, DataDistribution.PMF<Double>, DiscreteDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,DataDistribution<Double>>, ProbabilityFunction<Double>, ProbabilityMassFunction<Double>, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
ScalarDataDistribution

public static class ScalarDataDistribution.PMF
extends ScalarDataDistribution
implements DataDistribution.PMF<Double>

PMF of the ScalarDataDistribution

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
ScalarDataDistribution.CDF, ScalarDataDistribution.Estimator, ScalarDataDistribution.PMF
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.DefaultDataDistribution
DefaultDataDistribution.DefaultFactory<DataType>, DefaultDataDistribution.WeightedEstimator<KeyType>
 
Nested classes/interfaces inherited from class gov.sandia.cognition.collection.AbstractMutableDoubleMap
AbstractMutableDoubleMap.SimpleEntry<KeyType>, AbstractMutableDoubleMap.SimpleEntrySet<KeyType>, AbstractMutableDoubleMap.SimpleIterator<KeyType>
 
Nested classes/interfaces inherited from class gov.sandia.cognition.collection.AbstractScalarMap
AbstractScalarMap.MapWrapper
 
Nested classes/interfaces inherited from interface gov.sandia.cognition.statistics.DataDistribution
DataDistribution.PMF<KeyType>
 
Nested classes/interfaces inherited from interface gov.sandia.cognition.collection.ScalarMap
ScalarMap.Entry<KeyType>
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.DefaultDataDistribution
DEFAULT_INITIAL_CAPACITY, total
 
Fields inherited from class gov.sandia.cognition.collection.AbstractMutableDoubleMap
map
 
Constructor Summary
ScalarDataDistribution.PMF()
          Default constructor
ScalarDataDistribution.PMF(Iterable<? extends Number> data)
          Creates a new instance of PMF
ScalarDataDistribution.PMF(ScalarDataDistribution other)
          Copy constructor
 
Method Summary
 Double evaluate(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(Double input)
          Evaluate the natural logarithm of the distribution function.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
clone, getCDF, getEstimator, getMaxSupport, getMean, getMinSupport, getVariance
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.DefaultDataDistribution
clear, getMeanValue, getTotal, increment, set
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDataDistribution
fromInfiniteVector, getDomain, getDomainSize, getEntropy, getFraction, getLogFraction, getMaxValue, getMinValue, sample, sample, toInfiniteVector
 
Methods inherited from class gov.sandia.cognition.collection.AbstractMutableDoubleMap
asMap, compact, containsKey, entrySet, get, keySet, size
 
Methods inherited from class gov.sandia.cognition.collection.AbstractScalarMap
decrement, decrement, decrementAll, decrementAll, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, increment, incrementAll, incrementAll, isEmpty, setAll
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.statistics.DataDistribution
clone, fromInfiniteVector, getEntropy, getEstimator, getFraction, getLogFraction, getTotal, toInfiniteVector
 
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
 
Methods inherited from interface gov.sandia.cognition.statistics.ProbabilityMassFunction
getEntropy
 
Methods inherited from interface gov.sandia.cognition.statistics.DiscreteDistribution
getDomain, getDomainSize
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 

Constructor Detail

ScalarDataDistribution.PMF

public ScalarDataDistribution.PMF()
Default constructor


ScalarDataDistribution.PMF

public ScalarDataDistribution.PMF(ScalarDataDistribution other)
Copy constructor

Parameters:
other - ScalarDataDistribution to copy

ScalarDataDistribution.PMF

public ScalarDataDistribution.PMF(Iterable<? extends Number> data)
Creates a new instance of PMF

Parameters:
data - Data used to create the PMF
Method Detail

logEvaluate

public double logEvaluate(Double input)
Description copied from interface: ProbabilityFunction
Evaluate the natural logarithm of the distribution function. This is sometimes more efficient than evaluating the distribution function itself, and when evaluating the product of many independent or exchangeable samples.

Specified by:
logEvaluate in interface ProbabilityFunction<Double>
Returns:
Natural logarithm of the distribution function.

evaluate

public Double evaluate(Double input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Double,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

getProbabilityFunction

public ScalarDataDistribution.PMF 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<Double>
Specified by:
getProbabilityFunction in interface DataDistribution<Double>
Specified by:
getProbabilityFunction in interface DiscreteDistribution<Double>
Specified by:
getProbabilityFunction in interface ProbabilityMassFunction<Double>
Overrides:
getProbabilityFunction in class ScalarDataDistribution
Returns:
Distribution function associated with this Distribution.