Where We Are
K-Means draws a hard line: a point belongs to cluster 0 or cluster 1. Real data is often ambiguous.
Gaussian Mixture Models (GMMs) replace hard membership with probabilities.
1. Imagine several invisible generators
Suppose exam scores come from two overlapping populations. We do not know which student came from which population, but imagine each population generates scores according to a Gaussian.
A mixture model says:
- choose component with probability ;
- sample from that component’s Gaussian.
The resulting density is
The weights satisfy and .
2. Soft membership
For a particular point we can ask
These are called responsibilities. A point near the overlap might have
cluster A: 0.65
cluster B: 0.35
K-Means cannot express that uncertainty.
3. Geometry improves too
A Gaussian has a covariance matrix . Therefore a GMM component can represent stretched and rotated elliptical clusters.
K-Means: GMM:
○○○ //////
○ • ○ ///•///
○○○ //////
spherical elliptical
4. Likelihood is the objective
Given data , we want parameters that make the observed data likely:
There is a difficulty: the logarithm surrounds a sum. We do not know the hidden component that generated each point.
This is why the next chapter exists.
5. Connection to K-Means
K-Means can be viewed roughly as a limiting case where components are spherical with similar variance and assignments become almost completely certain. GMMs are therefore not an unrelated algorithm; they soften and generalize the clustering story.
6. Shape Check
For N data points, D features and K components:
X [N,D]
means [K,D]
covariances [K,D,D]
responsibility [N,K]
Each row of the responsibility matrix sums to 1.
Break It
Fit too many Gaussian components to too little data. A component may collapse around a point with tiny covariance, creating numerical trouble and overfitting. Regularization still matters in unsupervised learning.
What to Remember
- A GMM models data as a weighted sum of Gaussian generators.
- Membership is probabilistic, not hard.
- Covariance lets clusters be elliptical.
- Hidden component identities make direct maximum-likelihood optimization awkward.
Next → Expectation Maximization: how can we learn model parameters when the variable we need—the component identity—is hidden?