Class GaussianMixture
java.lang.Object
smile.stat.distribution.Mixture
smile.stat.distribution.ExponentialFamilyMixture
smile.stat.distribution.GaussianMixture
- All Implemented Interfaces:
Serializable, Distribution
Finite univariate Gaussian mixture. The EM algorithm is provided to learn
the mixture model from data. BIC score is employed to estimate the number
of components.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Mixture
Mixture.Component -
Field Summary
Fields inherited from class ExponentialFamilyMixture
bic, LFields inherited from class Mixture
components -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GaussianMixturefit(double[] x) Fits the Gaussian mixture model with the EM algorithm.static GaussianMixturefit(int k, double[] x) Fits the Gaussian mixture model with the EM algorithm.Methods inherited from class ExponentialFamilyMixture
fit, fitMethods inherited from class Mixture
bic, cdf, entropy, length, logp, map, mean, p, posteriori, quantile, rand, size, toString, varianceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Distribution
inverseTransformSampling, likelihood, logLikelihood, quantile, quantile, rand, rejectionSampling, sd
-
Constructor Details
-
GaussianMixture
Constructor.- Parameters:
components- a list of multivariate Gaussian distributions.
-
-
Method Details
-
fit
Fits the Gaussian mixture model with the EM algorithm.- Parameters:
k- the number of components.x- the training data.- Returns:
- the distribution.
-
fit
Fits the Gaussian mixture model with the EM algorithm. The number of components will be selected by BIC.- Parameters:
x- the training data.- Returns:
- the distribution.
-