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

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<MultivariateGaussian>
                      extended by gov.sandia.cognition.statistics.distribution.MixtureOfGaussians.PDF
All Implemented Interfaces:
Evaluator<Vector,Double>, Vectorizable, ClosedFormComputableDistribution<Vector>, ClosedFormDistribution<Vector>, ComputableDistribution<Vector>, Distribution<Vector>, DistributionWithMean<Vector>, ProbabilityDensityFunction<Vector>, ProbabilityFunction<Vector>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
MixtureOfGaussians

public static class MixtureOfGaussians.PDF
extends MultivariateMixtureDensityModel.PDF<MultivariateGaussian>

PDF of the MixtureOfGaussians

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
MixtureOfGaussians.PDF(Collection<? extends MultivariateGaussian> distributions)
          Creates a new instance of MixtureOfGaussians
MixtureOfGaussians.PDF(Collection<? extends MultivariateGaussian> distributions, double[] priorWeights)
          Creates a new instance of LinearMixtureModel
MixtureOfGaussians.PDF(MixtureOfGaussians.PDF other)
          Copy Constructor
MixtureOfGaussians.PDF(MultivariateGaussian... distributions)
          Creates a new instance of MixtureOfGaussians
 
Method Summary
 MixtureOfGaussians.PDF clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 double computeWeightedZSquared(Vector input)
          Computes the weighted z-value (deviate) of the given input.
 MultivariateGaussian.PDF fitSingleGaussian()
          Fits a single MultivariateGaussian to the given MixtureOfGaussians
 int getDimensionality()
          Gets the dimensionality of the MultivariateGaussian in the mixture
 MixtureOfGaussians.PDF getProbabilityFunction()
          Gets the distribution function associated with this Distribution, either the PDF or PMF.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.MultivariateMixtureDensityModel.PDF
computeRandomVariableLikelihoods, computeRandomVariableProbabilities, evaluate, getMostLikelyRandomVariable, logEvaluate
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.MultivariateMixtureDensityModel
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
convertFromVector, convertToVector
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 

Constructor Detail

MixtureOfGaussians.PDF

public MixtureOfGaussians.PDF(MultivariateGaussian... distributions)
Creates a new instance of MixtureOfGaussians

Parameters:
distributions - Underlying distributions from which we sample

MixtureOfGaussians.PDF

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

Parameters:
distributions - Underlying distributions from which we sample

MixtureOfGaussians.PDF

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

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

MixtureOfGaussians.PDF

public MixtureOfGaussians.PDF(MixtureOfGaussians.PDF other)
Copy Constructor

Parameters:
other - MixtureOfGaussians to copy
Method Detail

clone

public MixtureOfGaussians.PDF clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface Vectorizable
Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class MultivariateMixtureDensityModel<MultivariateGaussian>
Returns:
A clone of this object.

getProbabilityFunction

public MixtureOfGaussians.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 MultivariateMixtureDensityModel.PDF<MultivariateGaussian>
Returns:
Distribution function associated with this Distribution.

getDimensionality

public int getDimensionality()
Gets the dimensionality of the MultivariateGaussian in the mixture

Returns:
Input dimensionality of the mixture

fitSingleGaussian

public MultivariateGaussian.PDF fitSingleGaussian()
Fits a single MultivariateGaussian to the given MixtureOfGaussians

Returns:
MultivariateGaussian that captures the mean and covariance of the given MixtureOfGaussians

computeWeightedZSquared

public double computeWeightedZSquared(Vector input)
Computes the weighted z-value (deviate) of the given input. This is the multivariate equivalent of the "number of standard deviations away from the mean."

Parameters:
input - Input about which to compute the z-value.
Returns:
Weighted z-value.