Lesson 9 of 10 8 min · 134 words
PCA via SVD
The numerically stable way to compute components.
In practice, PCA is computed with the singular value decomposition of the centred data matrix: , where () and () are orthogonal and is diagonal with singular values .
Then , so the columns of are the principal directions and the eigenvalues are . The projected data is .
Why SVD? It never forms , which squares the condition number and can lose precision. It is numerically stable, and truncated / randomised SVD computes only the top components quickly for huge sparse matrices.
Formula to remember
Variance maximization
First component keeps the most variance.
Quick check · +5 XP