Gaussian Mixture Model#
Note
GMM assumes instances were generated from a mixture of several Gaussian distributions.
GMM uses the EM algorithm, E-step estimates which Gaussian, M-step maximizes parameters.
We can use BIC and AIC to select the number of distributions.
The simplest GMM variant which implemented in GaussianMixture must know in advance the number of Gaussian distributions
GMM assumes instances are generated by two steps:
Estimate#
The parameters of our model are
No closed form solution to this MLE problem, while if we knew what
The EM algorithm iteratively estimates
the E-step tries to estimate
, more precisely:
the M-step maximizes the parameters of based on our guesses:

Examples#
predict#
sample#
Selecting the Number of Distributions#
GMM use metrics such as Bayesian information criterion (BIC) or the Akaike information criterion (AIC):
where
Both BIC and AIC penalize models that have more parameters to learn and reward models that fit the data well.