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

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Number>
              extended by gov.sandia.cognition.statistics.distribution.YuleSimonDistribution
                  extended by gov.sandia.cognition.statistics.distribution.YuleSimonDistribution.PMF
All Implemented Interfaces:
Evaluator<Number,Double>, Vectorizable, ClosedFormComputableDistribution<Number>, ClosedFormDiscreteUnivariateDistribution<Number>, ClosedFormDistribution<Number>, ClosedFormUnivariateDistribution<Number>, ComputableDistribution<Number>, DiscreteDistribution<Number>, Distribution<Number>, DistributionWithMean<Number>, ProbabilityFunction<Number>, ProbabilityMassFunction<Number>, UnivariateDistribution<Number>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
YuleSimonDistribution

public static class YuleSimonDistribution.PMF
extends YuleSimonDistribution
implements ProbabilityMassFunction<Number>

PMF of the Yule-Simon Distribution

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.YuleSimonDistribution
YuleSimonDistribution.CDF, YuleSimonDistribution.PMF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.YuleSimonDistribution
DEFAULT_SHAPE, shape
 
Constructor Summary
YuleSimonDistribution.PMF()
          Creates a new instance of YuleSimonDistribution
YuleSimonDistribution.PMF(double shape)
          Creates a new instance of YuleSimonDistribution
YuleSimonDistribution.PMF(YuleSimonDistribution other)
          Copy constructor
 
Method Summary
 Double evaluate(Number input)
          Evaluates the function on the given input and returns the output.
 double getEntropy()
          Gets the entropy of the values in the histogram.
 YuleSimonDistribution.PMF getProbabilityFunction()
          Gets the distribution function associated with this Distribution, either the PDF or PMF.
 double logEvaluate(Number input)
          Evaluate the natural logarithm of the distribution function.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.YuleSimonDistribution
clone, convertFromVector, convertToVector, getCDF, getDomain, getDomainSize, getMaxSupport, getMean, getMinSupport, getShape, getVariance, sample, setShape
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
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.DiscreteDistribution
getDomain, getDomainSize
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

YuleSimonDistribution.PMF

public YuleSimonDistribution.PMF()
Creates a new instance of YuleSimonDistribution


YuleSimonDistribution.PMF

public YuleSimonDistribution.PMF(double shape)
Creates a new instance of YuleSimonDistribution

Parameters:
shape - Shape parameter, must be greater than zero

YuleSimonDistribution.PMF

public YuleSimonDistribution.PMF(YuleSimonDistribution other)
Copy constructor

Parameters:
other - YuleSimonDistribution to copy
Method Detail

getEntropy

public double getEntropy()
Description copied from interface: ProbabilityMassFunction
Gets the entropy of the values in the histogram.

Specified by:
getEntropy in interface ProbabilityMassFunction<Number>
Returns:
The entropy of the values in the histogram.

logEvaluate

public double logEvaluate(Number 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<Number>
Returns:
Natural logarithm of the distribution function.

evaluate

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

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

getProbabilityFunction

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