Skip to content
StackDecode
AI & ML Atlas
Machine LearningalgorithmInteractive simulation

Gaussian Mixture Models (GMM)

Models data as a blend of several bell-shaped clusters, with soft membership.

The idea

Each cluster is a Gaussian with a mean, spread and weight. Unlike k-means, every point belongs to every cluster with a probability ("responsibility"). The model is fitted with the EM algorithm, alternating between computing responsibilities and re-estimating the Gaussians.

p(x) = Σ πₖ · N(x | μₖ, Σₖ)

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

  • cluster 1
  • cluster 2
  • cluster 3

Start with 3 broad bell curves (rings show two standard deviations).

1/29

Rings are the fitted Gaussians; point opacity shows membership confidence.

Step by step

  1. 1Initialise the means, variances and mixing weights.
  2. 2E-step: compute each point's responsibility for each Gaussian.
  3. 3M-step: re-estimate the parameters using those responsibilities.
  4. 4Repeat until the likelihood stops rising.

Where it is used

Soft clustering, density estimation, speaker identification.

Watch out for

Local optima; a component can collapse onto a single point.

Related