public class GaussMixDistribution extends MixtureDistribution implements SamplingDistribution<Jama.Matrix>, FirstOrderMoment<Jama.Matrix>, SecondOrderCentralMoment<Jama.Matrix>, Copyable<GaussMixDistribution>
Modifier and Type | Field and Description |
---|---|
protected Random |
rand |
pdfs, weights
Constructor and Description |
---|
GaussMixDistribution(GaussianDistribution[] pdfs,
double[] weights,
Random rand)
Constructor for weighted Gaussian components
|
GaussMixDistribution(GaussianDistribution[] pdfs,
Random rand)
Constructor with equally weighted Gaussian components
|
Modifier and Type | Method and Description |
---|---|
GaussMixDistribution |
copy() |
Jama.Matrix |
drawSample()
Generate a new sample from this density.
|
Jama.Matrix |
getCovariance() |
Jama.Matrix |
getMean() |
void |
setPdf(int idx,
ProbabilityDensityFunction pdf) |
getNumOfComponents, getPdf, getWeight, getWeights, log_p, normalizeWeights, p, setWeight, setWeights
protected Random rand
public GaussMixDistribution(GaussianDistribution[] pdfs, Random rand)
pdfs
- Gaussian distributionsrand
- random generator for samplingpublic GaussMixDistribution(GaussianDistribution[] pdfs, double[] weights, Random rand) throws IllegalArgumentException
pdfs
- Gaussian distributionsweights
- weights of Gaussian distributionsrand
- random generator for samplingIllegalArgumentException
- if length of pdfs- and weights-array differspublic GaussMixDistribution copy()
copy
in interface Copyable<GaussMixDistribution>
public Jama.Matrix getCovariance()
getCovariance
in interface SecondOrderCentralMoment<Jama.Matrix>
public Jama.Matrix getMean()
getMean
in interface FirstOrderMoment<Jama.Matrix>
public void setPdf(int idx, ProbabilityDensityFunction pdf) throws IllegalArgumentException
setPdf
in class MixtureDistribution
IllegalArgumentException
public Jama.Matrix drawSample()
SamplingDistribution
drawSample
in interface SamplingDistribution<Jama.Matrix>
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.