org.apache.commons.math3.distribution

## Class MixtureMultivariateNormalDistribution

- java.lang.Object
- - org.apache.commons.math3.distribution.AbstractMultivariateRealDistribution
  - - org.apache.commons.math3.distribution.MixtureMultivariateRealDistribution<MultivariateNormalDistribution>
    - - org.apache.commons.math3.distribution.MixtureMultivariateNormalDistribution

- All Implemented Interfaces:
    MultivariateRealDistribution

      public class MixtureMultivariateNormalDistribution
      extends MixtureMultivariateRealDistribution<MultivariateNormalDistribution>

  Multivariate normal mixture distribution. This class is mainly syntactic sugar.
  Since:
    3.2
  Version:
    $Id: MixtureMultivariateNormalDistribution.java 1517418 2013-08-26 03:18:55Z dbrosius $
  See Also:
    `MixtureMultivariateRealDistribution`

- - ### Field Summary

    - ### Fields inherited from class org.apache.commons.math3.distribution.AbstractMultivariateRealDistribution

      `random`

  - ### Constructor Summary

    Constructors
    Constructor and 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.apache.commons.math3.distribution.MixtureMultivariateRealDistribution

      `density, getComponents, reseedRandomGenerator, sample`

    - ### Methods inherited from class org.apache.commons.math3.distribution.AbstractMultivariateRealDistribution

      `getDimension, sample`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MixtureMultivariateNormalDistribution

          public MixtureMultivariateNormalDistribution(double[] weights,
                                               double[][] means,
                                               double[][][] covariances)

      Creates a multivariate normal mixture distribution.
      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.
      Parameters:
        `components` - List of (weight, distribution) pairs from which to sample.

    - #### MixtureMultivariateNormalDistribution

          public MixtureMultivariateNormalDistribution(RandomGenerator rng,
                                               List<Pair<Double,MultivariateNormalDistribution>> components)
                                                throws NotPositiveException,
                                                       DimensionMismatchException

      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:
        `NotPositiveException` - if any of the weights is negative.
        `DimensionMismatchException` - if not all components have the same number of variables.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.