Class MixtureMultivariateNormalDistribution
- java.lang.Object
 - 
- org.hipparchus.distribution.multivariate.AbstractMultivariateRealDistribution
 - 
- org.hipparchus.distribution.multivariate.MixtureMultivariateRealDistribution<MultivariateNormalDistribution>
 - 
- org.hipparchus.distribution.multivariate.MixtureMultivariateNormalDistribution
 
 
 
 
- 
- All Implemented Interfaces:
 MultivariateRealDistribution
public class MixtureMultivariateNormalDistribution extends MixtureMultivariateRealDistribution<MultivariateNormalDistribution>
Multivariate normal mixture distribution. This class is mainly syntactic sugar.- See Also:
 MixtureMultivariateRealDistribution
 
- 
- 
Field Summary
- 
Fields inherited from class org.hipparchus.distribution.multivariate.AbstractMultivariateRealDistribution
random 
 - 
 
- 
Constructor Summary
Constructors Constructor Description MixtureMultivariateNormalDistribution(double[] weights, double[][] means, double[][][] covariances)Creates a multivariate normal mixture distribution.MixtureMultivariateNormalDistribution(List<Pair<Double,MultivariateNormalDistribution>> components)Creates a mixture model from a list of distributions and their associated weights.MixtureMultivariateNormalDistribution(RandomGenerator rng, List<Pair<Double,MultivariateNormalDistribution>> components)Creates a mixture model from a list of distributions and their associated weights. 
- 
Method Summary
- 
Methods inherited from class org.hipparchus.distribution.multivariate.MixtureMultivariateRealDistribution
density, getComponents, reseedRandomGenerator, sample 
- 
Methods inherited from class org.hipparchus.distribution.multivariate.AbstractMultivariateRealDistribution
getDimension, sample 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
MixtureMultivariateNormalDistribution
public MixtureMultivariateNormalDistribution(double[] weights, double[][] means, double[][][] covariances)Creates a multivariate normal mixture distribution.Note: this constructor will implicitly create an instance of
Well19937cas random generator to be used for sampling only (seeMixtureMultivariateRealDistribution.sample()andAbstractMultivariateRealDistribution.sample(int)). In case no sampling is needed for the created distribution, it is advised to passnullas random generator via the appropriate constructors to avoid the additional initialisation overhead.- Parameters:
 weights- Weights of each component.means- Mean vector for each component.covariances- Covariance matrix for each component.
 
- 
MixtureMultivariateNormalDistribution
public MixtureMultivariateNormalDistribution(List<Pair<Double,MultivariateNormalDistribution>> components)
Creates a mixture model from a list of distributions and their associated weights.Note: this constructor will implicitly create an instance of
Well19937cas random generator to be used for sampling only (seeMixtureMultivariateRealDistribution.sample()andAbstractMultivariateRealDistribution.sample(int)). In case no sampling is needed for the created distribution, it is advised to passnullas random generator via the appropriate constructors to avoid the additional initialisation overhead.- Parameters:
 components- List of (weight, distribution) pairs from which to sample.
 
- 
MixtureMultivariateNormalDistribution
public MixtureMultivariateNormalDistribution(RandomGenerator rng, List<Pair<Double,MultivariateNormalDistribution>> components) throws MathIllegalArgumentException
Creates a mixture model from a list of distributions and their associated weights.- Parameters:
 rng- Random number generator.components- Distributions from which to sample.- Throws:
 MathIllegalArgumentException- if any of the weights is negative.MathIllegalArgumentException- if not all components have the same number of variables.
 
 - 
 
 -