gov.sandia.cognition.statistics.distribution
Class MultivariateMixtureDensityModel.PDF<DistributionType extends ClosedFormComputableDistribution<Vector>>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<DataType>
          extended by gov.sandia.cognition.statistics.distribution.LinearMixtureModel<Vector,DistributionType>
              extended by gov.sandia.cognition.statistics.distribution.MultivariateMixtureDensityModel<DistributionType>
                  extended by gov.sandia.cognition.statistics.distribution.MultivariateMixtureDensityModel.PDF<DistributionType>
Type Parameters:
DistributionType - Type of Distribution in the mixture
All Implemented Interfaces:
Evaluator<Vector,Double>, Vectorizable, ClosedFormComputableDistribution<Vector>, ClosedFormDistribution<Vector>, ComputableDistribution<Vector>, Distribution<Vector>, DistributionWithMean<Vector>, ProbabilityDensityFunction<Vector>, ProbabilityFunction<Vector>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
MixtureOfGaussians.PDF
Enclosing class:
MultivariateMixtureDensityModel<DistributionType extends ClosedFormComputableDistribution<Vector>>

public static class MultivariateMixtureDensityModel.PDF<DistributionType extends ClosedFormComputableDistribution<Vector>>
extends MultivariateMixtureDensityModel<DistributionType>
implements ProbabilityDensityFunction<Vector>

PDF of the MultivariateMixtureDensityModel

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.MultivariateMixtureDensityModel
MultivariateMixtureDensityModel.PDF<DistributionType extends ClosedFormComputableDistribution<Vector>>
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.LinearMixtureModel
distributions, priorWeights
 
Constructor Summary
MultivariateMixtureDensityModel.PDF(Collection<? extends DistributionType> distributions)
          Creates a new instance of MultivariateMixtureDensityModel
MultivariateMixtureDensityModel.PDF(Collection<? extends DistributionType> distributions, double[] priorWeights)
          Creates a new instance of MultivariateMixtureDensityModel
MultivariateMixtureDensityModel.PDF(MultivariateMixtureDensityModel<? extends DistributionType> other)
          Copy Constructor
 
Method Summary
 double[] computeRandomVariableLikelihoods(Vector input)
          Computes the likelihoods of the underlying distributions
 double[] computeRandomVariableProbabilities(Vector input)
          Computes the probability distribution that the input was generated by the underlying distributions
 Double evaluate(Vector input)
          Evaluates the function on the given input and returns the output.
 int getMostLikelyRandomVariable(Vector input)
          Gets the index of the most-likely distribution, given the input.
 MultivariateMixtureDensityModel.PDF<DistributionType> 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.MultivariateMixtureDensityModel
clone, convertFromVector, convertToVector, getMean
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.LinearMixtureModel
getDistributionCount, getDistributions, getPriorWeights, getPriorWeightSum, sample, sample, setDistributions, setPriorWeights, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, 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

MultivariateMixtureDensityModel.PDF

public MultivariateMixtureDensityModel.PDF(Collection<? extends DistributionType> distributions)
Creates a new instance of MultivariateMixtureDensityModel

Parameters:
distributions - Underlying distributions from which we sample

MultivariateMixtureDensityModel.PDF

public MultivariateMixtureDensityModel.PDF(Collection<? extends DistributionType> distributions,
                                           double[] priorWeights)
Creates a new instance of MultivariateMixtureDensityModel

Parameters:
distributions - Underlying distributions from which we sample
priorWeights - Weights proportionate by which the distributions are sampled

MultivariateMixtureDensityModel.PDF

public MultivariateMixtureDensityModel.PDF(MultivariateMixtureDensityModel<? extends DistributionType> other)
Copy Constructor

Parameters:
other - MultivariateMixtureDensityModel to copy
Method Detail

getProbabilityFunction

public MultivariateMixtureDensityModel.PDF<DistributionType> 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 MultivariateMixtureDensityModel<DistributionType extends ClosedFormComputableDistribution<Vector>>
Returns:
Distribution function associated with this Distribution.

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.

evaluate

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

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

computeRandomVariableProbabilities

public double[] computeRandomVariableProbabilities(Vector input)
Computes the probability distribution that the input was generated by the underlying distributions

Parameters:
input - Input to consider
Returns:
probability distribution that the input was generated by the underlying distributions

computeRandomVariableLikelihoods

public double[] computeRandomVariableLikelihoods(Vector input)
Computes the likelihoods of the underlying distributions

Parameters:
input - Input to consider
Returns:
Vector of likelihoods for the underlying distributions

getMostLikelyRandomVariable

public int getMostLikelyRandomVariable(Vector input)
Gets the index of the most-likely distribution, given the input. That is, find the distribution that most likely generated the input

Parameters:
input - input to consider
Returns:
zero-based index of the most-likely distribution