Gaussian Mixture Model Selection
This example shows that model selection can be performed with Gaussian Mixture Models (GMM) using information-theory criteria. Model selection concerns both the covariance type and the number of components in the model.
In this case, both the Akaike Information Criterion (AIC) and the Bayes Information Criterion (BIC) provide the right result, but we only demo the latter as BIC is better suited to identify the true model among a set of candidates. Unlike Bayesian procedures, such inferences are prior-free.
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
Data generation
We generate two components (each one containing n_samples) by randomly
sampling the standard normal distribution as returned by .
One component is kept spherical yet shifted and re-scaled. The other one is
deformed to have a more general covariance matrix.


