Package smile.stat.distribution
Class MultivariateExponentialFamilyMixture
java.lang.Object
smile.stat.distribution.MultivariateMixture
smile.stat.distribution.MultivariateExponentialFamilyMixture
- All Implemented Interfaces:
Serializable
,MultivariateDistribution
- Direct Known Subclasses:
MultivariateGaussianMixture
The finite mixture of distributions from multivariate exponential family.
The EM algorithm can be used to learn the mixture model from data.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class smile.stat.distribution.MultivariateMixture
MultivariateMixture.Component
-
Field Summary
Modifier and TypeFieldDescriptionfinal double
The BIC score when the distribution is fit on a sample data.final double
The log-likelihood when the distribution is fit on a sample data.Fields inherited from class smile.stat.distribution.MultivariateMixture
components
-
Constructor Summary
ConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptionfit
(double[][] x, MultivariateMixture.Component... components) Fits the mixture model with the EM algorithm.fit
(double[][] x, MultivariateMixture.Component[] components, double gamma, int maxIter, double tol) Fits the mixture model with the EM algorithm.Methods inherited from class smile.stat.distribution.MultivariateMixture
bic, cdf, cov, entropy, length, logp, map, mean, p, posteriori, size, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface smile.stat.distribution.MultivariateDistribution
likelihood, logLikelihood
-
Field Details
-
L
public final double LThe log-likelihood when the distribution is fit on a sample data. -
bic
public final double bicThe BIC score when the distribution is fit on a sample data.
-
-
Constructor Details
-
MultivariateExponentialFamilyMixture
Constructor.- Parameters:
components
- a list of multivariate exponential family distributions.
-
-
Method Details
-
fit
public static MultivariateExponentialFamilyMixture fit(double[][] x, MultivariateMixture.Component... components) Fits the mixture model with the EM algorithm.- Parameters:
x
- the training data.components
- the initial configuration of mixture. Components may have different distribution form.- Returns:
- the distribution.
-
fit
public static MultivariateExponentialFamilyMixture fit(double[][] x, MultivariateMixture.Component[] components, double gamma, int maxIter, double tol) Fits the mixture model with the EM algorithm.- Parameters:
x
- the training data.components
- the initial configuration of mixture. Components may have different distribution form.gamma
- the regularization parameter.maxIter
- the maximum number of iterations.tol
- the tolerance of convergence test.- Returns:
- the distribution.
-