Latent Variables — Grouping Points and the Widest Direction

See, with pictures and motion, how a cloud of points without name tags (correct answers) is sorted into groups automatically, and how the direction in which the cloud spreads out the most is found.

Advance k-means, which splits unlabeled data into “similar” groups, and the EM algorithm for a Gaussian mixture one step at a time, and check that the responsibilities, means, covariances, and log-likelihood change exactly as the formulas say. In the second half, use PCA (principal component analysis) to check numerically that the direction of maximum projected variance is an eigenvector of the covariance matrix, that the reconstruction error equals the sum of the discarded eigenvalues, and that principal components do not coincide with the physical component spectra.

Can a cloud of points be sorted into groups automatically?

Plant flags in the cloud of points, then repeat “Paint with nearest flag color” and “Move flags to group centers” one step at a time.

These are synthetic data for teaching purposes (150 made-up points, each a pair of measurements).

Back to Machine Learning — From Probability to GPT (Contents) | Text: Chapter 17, Section 17.5, Chapter 18, Section 18.2 | Equations and explanation (explanation page) | Equations are typeset with the browser’s built-in MathML (no external library).