.. _book_fig_chapter6_fig_GMM_nclusters: Number of Clusters for Gaussian Mixtures ---------------------------------------- Figure 6.9 The BIC-optimized number of components in a Gaussian mixture model as a function of the sample size. All three samples (with 100, 1000, and 10,000 points) are drawn from the same distribution: two narrow foreground Gaussians and two wide background Gaussians. The top-right panel shows the BIC as a function of the number of components in the mixture. The remaining panels show the distribution of points in the sample and the 1, 2, and 3 standard deviation contours of the best-fit mixture model. .. image:: ../images/chapter6/fig_GMM_nclusters_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_GMM_nclusters.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_GMM_nclusters.py :lines: 14- .. raw:: html
:download:`[download source: fig_GMM_nclusters.py] ` .. raw:: html