| Modifier and Type | Field and Description |
|---|---|
| private final List | distribution
Mixture components. |
| private final double[] | weight
Normalized weight of each mixture component. |
| Access | Constructor and Description |
|---|---|
| public | MixtureMultivariateRealDistribution(List<Pair<Double, T>>
List of (weight, distribution) pairs from which to sample. components)Creates a mixture model from a list of distributions and their associated weights. |
| public | MixtureMultivariateRealDistribution(RandomGenerator
Random number generator. rng, List<Pair<Double, T>> Distributions from which to sample. components)Creates a mixture model from a list of distributions and their associated weights. |
| Modifier and Type | Method and Description |
|---|---|
| public double | density(final double[]
Point at which the PDF is evaluated. values)Implements org. Returns the probability density function (PDF) of this distribution
evaluated at the specified point |
| public List | Returns: the component distributions and associated weights.Gets the distributions that make up the mixture model. |
| public void | reseedRandomGenerator(long
Seed with which to initialize the random number generator. seed)Overrides org. Implements org. Reseeds the random generator used to generate samples. |
| public double[] | sample()
Implements abstract org. Implements org. Generates a random value vector sampled from this distribution. |
| distribution | back to summary |
|---|---|
| private final List<T> distribution Mixture components. | |
| weight | back to summary |
|---|---|
| private final double[] weight Normalized weight of each mixture component. | |
| MixtureMultivariateRealDistribution | back to summary |
|---|---|
| public MixtureMultivariateRealDistribution(List<Pair<Double, T>> components) Creates a mixture model from a list of distributions and their associated weights. Note this constructor will implicitly create an instance of
| |
| MixtureMultivariateRealDistribution | back to summary |
|---|---|
| public MixtureMultivariateRealDistribution(RandomGenerator rng, List<Pair<Double, T>> components) Creates a mixture model from a list of distributions and their associated weights.
| |
| density | back to summary |
|---|---|
| public double density(final double[] values) Implements org. Doc from org. Returns the probability density function (PDF) of this distribution
evaluated at the specified point
| |
| getComponents | back to summary |
|---|---|
| public List Gets the distributions that make up the mixture model. | |
| reseedRandomGenerator | back to summary |
|---|---|
| public void reseedRandomGenerator(long seed) Overrides org. Implements org. Doc from org. Reseeds the random generator used to generate samples.
| |
| sample | back to summary |
|---|---|
| public double[] sample() Implements abstract org. Implements org. Doc from org. Generates a random value vector sampled from this distribution.
| |