T - Type of the mixture components.MultivariateRealDistributionMixtureMultivariateNormalDistributionpublic class MixtureMultivariateRealDistribution<T extends MultivariateRealDistribution> extends AbstractMultivariateRealDistribution
MultivariateRealDistribution.Sampler| Constructor | Description |
|---|---|
MixtureMultivariateRealDistribution(List<Pair<Double,T>> components) |
Creates a mixture model from a list of distributions and their
associated weights.
|
| Modifier and Type | Method | Description |
|---|---|---|
MultivariateRealDistribution.Sampler |
createSampler(org.apache.commons.rng.UniformRandomProvider rng) |
Creates a sampler.
|
double |
density(double[] values) |
Returns the probability density function (PDF) of this distribution
evaluated at the specified point
x. |
List<Pair<Double,T>> |
getComponents() |
Gets the distributions that make up the mixture model.
|
getDimension, samplepublic MixtureMultivariateRealDistribution(List<Pair<Double,T>> components)
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 double density(double[] values)
x. In general, the PDF is the
derivative of the cumulative distribution function. If the derivative
does not exist at x, then an appropriate replacement should be
returned, e.g. Double.POSITIVE_INFINITY, Double.NaN, or
the limit inferior or limit superior of the difference quotient.values - Point at which the PDF is evaluated.x.public List<Pair<Double,T>> getComponents()
public MultivariateRealDistribution.Sampler createSampler(org.apache.commons.rng.UniformRandomProvider rng)
createSampler in interface MultivariateRealDistributioncreateSampler in class AbstractMultivariateRealDistributionrng - Generator of uniformly distributed numbers.Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.