gov.sandia.cognition.statistics.distribution
Class DirichletDistribution.PDF

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<Vector>
          extended by gov.sandia.cognition.statistics.distribution.DirichletDistribution
              extended by gov.sandia.cognition.statistics.distribution.DirichletDistribution.PDF
All Implemented Interfaces:
Evaluator<Vector,Double>, VectorInputEvaluator<Vector,Double>, Vectorizable, ClosedFormComputableDistribution<Vector>, ClosedFormDistribution<Vector>, ComputableDistribution<Vector>, Distribution<Vector>, DistributionWithMean<Vector>, ProbabilityDensityFunction<Vector>, ProbabilityFunction<Vector>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
DirichletDistribution

public static class DirichletDistribution.PDF
extends DirichletDistribution
implements ProbabilityDensityFunction<Vector>, VectorInputEvaluator<Vector,Double>

PDF of the Dirichlet distribution.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.DirichletDistribution
DirichletDistribution.PDF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.DirichletDistribution
parameters
 
Constructor Summary
DirichletDistribution.PDF()
          Default constructor.
DirichletDistribution.PDF(DirichletDistribution other)
          Copy Constructor.
DirichletDistribution.PDF(Vector parameters)
          Creates a new instance of PDF
 
Method Summary
 Double evaluate(Vector input)
          Evaluates the Dirichlet PDF about the given input.
 int getInputDimensionality()
          Gets the expected dimensionality of the input vector to the evaluator, if it is known.
 DirichletDistribution.PDF getProbabilityFunction()
          Gets the distribution function associated with this Distribution, either the PDF or PMF.
 double logEvaluate(Vector input)
          Evaluate the natural logarithm of the distribution function.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.DirichletDistribution
clone, convertFromVector, convertToVector, getMean, getParameters, sample, setParameters
 
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.DistributionWithMean
getMean
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable
clone, convertFromVector, convertToVector
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 

Constructor Detail

DirichletDistribution.PDF

public DirichletDistribution.PDF()
Default constructor.


DirichletDistribution.PDF

public DirichletDistribution.PDF(Vector parameters)
Creates a new instance of PDF

Parameters:
parameters - Parameters of the Dirichlet distribution, must be at least 2-dimensional and each element must be positive.

DirichletDistribution.PDF

public DirichletDistribution.PDF(DirichletDistribution other)
Copy Constructor.

Parameters:
other - DirichletDistribution to copy.
Method Detail

evaluate

public Double evaluate(Vector input)
Evaluates the Dirichlet PDF about the given input. Note that we normalize the given input by its L1 norm to ensure that its entries sum to 1.

Specified by:
evaluate in interface Evaluator<Vector,Double>
Parameters:
input - Input to consider, automatically normalized by its L1 norm without side-effect.
Returns:
Dirichlet PDF evaluated about the given (unnormalized) input.

logEvaluate

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

getInputDimensionality

public int getInputDimensionality()
Description copied from interface: VectorInputEvaluator
Gets the expected dimensionality of the input vector to the evaluator, if it is known. If it is not known, -1 is returned.

Specified by:
getInputDimensionality in interface VectorInputEvaluator<Vector,Double>
Returns:
The expected dimensionality of the input vector to the evaluator, or -1 if it is not known.

getProbabilityFunction

public DirichletDistribution.PDF 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<Vector>
Specified by:
getProbabilityFunction in interface ProbabilityDensityFunction<Vector>
Overrides:
getProbabilityFunction in class DirichletDistribution
Returns:
Distribution function associated with this Distribution.