public class MixtureMultivariateNormalDistribution extends MixtureMultivariateRealDistribution<MultivariateNormalDistribution>
random
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.
|
Modifier and Type | Method and Description |
---|---|
static List<Pair<Double,MultivariateNormalDistribution>> |
createComponents(double[] weights,
double[][] means,
double[][][] covariances)
Creates a mixture of Gaussian distributions.
|
density, getComponents, reseedRandomGenerator, sample
getDimension, sample
public MixtureMultivariateNormalDistribution(double[] weights, double[][] means, double[][][] covariances)
Note: this constructor will implicitly create an instance of
Well19937c
as random generator to be used for sampling only
(see MixtureMultivariateRealDistribution.sample()
and AbstractMultivariateRealDistribution.sample(int)
). In case no sampling is needed for the created distribution, it
is advised to pass null
as random generator via the appropriate constructors to avoid the additional
initialisation overhead.
weights
- Weights of each component.means
- Mean vector for each component.covariances
- Covariance matrix for each component.public MixtureMultivariateNormalDistribution(List<Pair<Double,MultivariateNormalDistribution>> components)
Note: this constructor will implicitly create an instance of
Well19937c
as random generator to be used for sampling only
(see MixtureMultivariateRealDistribution.sample()
and AbstractMultivariateRealDistribution.sample(int)
). In case no sampling is needed for the created distribution, it
is advised to pass null
as random generator via the appropriate constructors to avoid the additional
initialisation overhead.
components
- List of (weight, distribution) pairs from which to sample.public MixtureMultivariateNormalDistribution(RandomGenerator rng, List<Pair<Double,MultivariateNormalDistribution>> components) throws NotPositiveException, DimensionMismatchException
rng
- Random number generator.components
- Distributions from which to sample.NotPositiveException
- if any of the weights is negative.DimensionMismatchException
- if not all components have the same
number of variables.public static List<Pair<Double,MultivariateNormalDistribution>> createComponents(double[] weights, double[][] means, double[][][] covariances)
weights
- Weights of each component.means
- Mean vector for each component.covariances
- Covariance matrix for each component.Copyright © 2023 CNES. All rights reserved.