Advanced Topics · Machine Learning

GMMs

1. Model

Data = mix of KK Gaussians with weights πkπ_{k} (sum =1=1):

p(x)=sumk=1..Kπk Gauss(x;μk,Σk)p(x) = \text{sum}_{k=1..K} π_{k} \text{ Gauss}(x; μ_{k}, Σ_{k})

Soft clustering: point belongs to all components with probabilities (responsibilities), unlike kk-means hard assignment.

2. Training by EM

E:

γik=πk Gauss(xi;μk,Σk)sumjπj Gauss(xi;μj,Σj)γ_{ik} = \frac{π_{k} \text{ Gauss}(x_{i}; μ_{k}, Σ_{k})}{\text{sum}_{j} π_{j} \text{ Gauss}(x_{i}; μ_{j}, Σ_{j})}

M: μkμ_{k} = weighted mean with γγ, ΣkΣ_{k} = weighted covariance, πkπ_{k} = mean γγ.

3. GMM vs K-means

K-means GMM
Assignment hard (nearest) soft (probabilities)
Shape spheres ellipses (full ΣΣ)
Needs kk KK + init (often kk-means)
Picks KK by elbow BIC / validation likelihood

4. Practice

Init by kk-means, regularize ΣΣ (add small εIεI) to avoid collapse on one point, restart 5-10×.

5. Exam Points

  • Write mixture form + responsibility — 7 marks, very frequent.
  • GMM vs kk-means — 3-5 marks, frequent.
  • Singularity fix (εIεI) — 2 marks.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Machine Learning modules