All labs

EM, Step by Step

Soft assignments, monotone likelihood, and convergence to the wrong local optimum.

Ch 8 8.7
Animator
Unsupervised Learning & Text
22 mindifficulty 4/5

Controls

3
3

Try K ≠ K* to see mixtures merge or split truth.

2.600

Distance between true centers, in standard deviations.

2.500

Ratio of the long axis to the short axis of each true cluster.

220
Initialization
Random seed

Every result on this page is a deterministic function of the seed and the controls.

Step control

Stage 0 of 17initialization.

Scatter: points coloured by soft responsibility

Colour is a weighted blend of the component colours by posterior responsibility; ellipses show 1 and 2 standard-deviation contours.

-6-4-20246-6-4-202468x1x2
component 1component 2component 3

Log-likelihood versus EM iteration

Every completed E-step can only raise (or hold) the log-likelihood — the curve never dips.

-1200-1150-1100-1050-1000-950-90002468iterationlog-likelihood
Log-likelihood
BIC
lower is better
Iterations
0
Converged
no
Δ log-likelihood < 1e-4
ARI vs. truth
0.856
1 = perfect recovery, 0 = chance

Compare seeds: EM is not a global optimizer

Same data, same fitted K, same initialization strategy — different seeds land on different local optima.

seedfinal log-likelihooditerationsglobal best?
7-862.4459yes
8-862.4457yes
9-862.44511yes
10-862.4457yes
EM finds THE maximum-likelihood solution

EM only guarantees that each iteration does not decrease the log-likelihood; it climbs the nearest hill from wherever it starts. Different seeds — hence different random initializations — regularly land at different final log-likelihoods for the identical dataset. The "worst-case corner" initialization above is built to strand components far from the data mass, and it converges to a clearly inferior optimum compared with a k-means++ start.