Dimensionality Reduction Overview
Chapter 9 fitted a function to labelled data. Chapter 10 has no labels — only , and the second of the book’s four pillars: “dimensionality reduction exploits structure and correlation and allows us to work with a more compact representation of the data, ideally without losing information.”
PCA is over a hundred years old, and the chapter derives it twice.
One answer, two derivations
Section titled “One answer, two derivations”| §10.2 maximum variance | §10.3 projection | |
|---|---|---|
| what you maximise or minimise | the variance you keep | the error you pay |
| the objective | ||
| at the optimum | ||
| the answer | the top eigenvectors | the top eigenvectors |
They are not two methods that happen to agree. for every and every orthonormal — measured constant to against a trace of . One quantity, read from either end of a fixed total. That is why the book can write “we omit a derivation that is identical to the one presented in Section 10.2” and lose nothing.
Where the measuring pays off
Section titled “Where the measuring pays off”Everything in this chapter has a closed form, so every claim can be checked exactly. Five that turned up something:
The four words “with mean ” carry Equation 10.1. Applied to raw data it is the second-moment matrix, not the covariance. Measured on images of the digit “8”: the trace inflates by and the leading direction swings — landing from the mean image, a direction on which every data point has nearly the same coordinate.
§10.5 contains an off-by-one that centred data contradicts. The book says the Gram matrix “has rank and is invertible”. For the centred data it assumes in its own first sentence, the rank is and the condition number is — the all-ones vector sits in the null space. The adjacent claim of zero eigenvalues is the correct one.
Held-out reconstruction error cannot choose . Chapter 9’s test RMSE rose past the right degree, which is what made it usable. This one falls monotonically to zero, because a larger subspace can never project a point further away — on any data. Four defensible rules applied to the same spectrum give , , and .
Equation 10.32 is not a general formula for coordinates. It is what Equation 10.34’s collapses to when the columns are orthonormal. Applied to a basis spanning the identical subspace but rescaled, the reconstruction error goes from to , with nothing raised.
Standardising is a modelling decision, not tidiness. Changing height from metres to millimetres rotates the leading direction on data that never moved. After Step 2 the three unit choices agree to degrees — and the standardised covariance is the correlation matrix, with trace exactly .
The pages
Section titled “The pages”| # | page | book section | the measured claim |
|---|---|---|---|
| 1001 | Problem Setting | §10.1 | skip the centring and moves |
| 1002 | The Maximum Variance Perspective | §10.2 | to ; random search reaches |
| 1003 | The Projection Perspective | §10.3.1–10.3.2 | the residual is in , to twelve decimals |
| 1004 | Finding the Principal Subspace | §10.3.3 | random bases, zero beat the eigenbasis |
| 1005 | Eigenvector Computation and Low-Rank Approximations | §10.4 | eigh returns negative eigenvalues at |
| 1006 | PCA in High Dimensions | §10.5 | faster at , and the book is off by one |
| 1007 | Key Steps of PCA in Practice | §10.6 | a unit change costs ; the leak makes it look better |
| 1008 | The Latent Variable Perspective | §10.7 | , and it never sees the data |
| 1009 | Chapter 10 Worked Problems | — | eight problems, this module’s own |
| 1010 | Chapter 10 Formula Sheet | — | every equation and every measured constant |
The thread that runs through it
Section titled “The thread that runs through it”One number appears on four pages by four routes, and noticing that is most of understanding the chapter:
| where it appears | page | value |
|---|---|---|
| , Equation 10.44 | 1002 | |
| the measured reconstruction error, Equation 10.29 | 1002 | |
| , Equation 10.43b | 1004 | |
| , Eckart–Young | 1005 |
It is , the price of a five-number code. §10.2 reached it without ever forming a projection, §10.3 by deriving it, §10.4 as a theorem about matrix approximation. Three literatures, one number.
What only the probabilistic view can do
Section titled “What only the probabilistic view can do”§10.7 puts a generative model behind all of it — the same move §9.3 made for regression — and the payoff is measurable rather than rhetorical:
| capability | measured |
|---|---|
| fill in pixels never observed | better than mean-filling at missing |
| score novelty | every digit “0” above the s’ th percentile |
| a posterior whose width you know in advance | , unchanged across observations |
| estimate the noise you are discarding | , exact to decimals |
And it recovers everything before it: PPCA is PCA with shrinkage, each axis scaled by — measured to six decimals — converging to PCA as .
What the chapter cannot do, and says so
Section titled “What the chapter cannot do, and says so”Two limits are worth carrying forward, because both are load-bearing for later chapters.
PCA finds the subspace, not the signals. The objective depends on alone, so rotating by any orthogonal leaves the error at and the projector identical to — while moving the codes by and destroying their uncorrelatedness ( becomes ). That is Equation 10.78’s arbitrary , and it is why independent component analysis exists.
PCA is linear, and some data is not. A noisy circle in has one intrinsic degree of freedom and two nearly equal eigenvalues, and ; no line keeps more than . But §10.5’s matrix is built entirely from inner products, and appears nowhere in it — so swapping the Gram matrix for a kernel matrix takes one line and separates two concentric rings from to . Kernel PCA is this chapter with one substitution, and Chapter 12 makes the same one.
Where it goes next
Section titled “Where it goes next”| §10.8’s pointer | and where it already appeared |
|---|---|
| kernel PCA — infinite-dimensional features | page 1006 measured that never enters the matrix; page 1009 ran it |
| deep auto-encoders — PCA is the identity-activation case | Equation 10.76, and page 1004’s rotation ambiguity |
| factor analysis — a different per dimension | page 1007’s zero-variance pixels are the degenerate case |
| ICA — a non-Gaussian prior on | page 1004’s , measured to leave exactly unchanged |
| Bayesian PCA — integrate the parameters out | Chapter 9’s §9.3, and page 908’s marginal likelihood |
And the remaining pillars: Chapter 11 applies the same machinery to density estimation, Chapter 12 to classification.
Recall card
Section titled “Recall card”- Chapter 10 has no labels. The data is just x, and the task is a compact representation of it that loses as little as possible.
- The chapter derives PCA twice — by maximising the variance kept and by minimising the reconstruction error — and reaches the same eigenvectors both times.
- That is not a coincidence: the variance kept and the error paid always sum to the trace of the covariance matrix, measured constant to 2.3e-13.
- Equation 10.1 is a covariance only because the data is assumed centred. Skip that and the leading direction swings 87.9996 degrees onto the mean image itself.
- One number, 320.123369, appears by four independent routes — the leftover eigenvalues, the measured error, a trace, and the Eckart-Young theorem.
- Two hundred thousand random orthonormal bases, and not one beats the eigenbasis.
- The objective sees only the projection matrix, so rotating the basis changes the codes by 39.243537 and the error by nothing. PCA finds the subspace, not the signals.
- Held-out reconstruction error cannot choose the code length, because it falls monotonically to zero. Four defensible rules give four different answers.
- Use the SVD of the data, not the eigendecomposition of the covariance, whenever the small eigenvalues matter — squaring the condition number returns 18 negative eigenvalues at 1e10.
- When there are fewer points than dimensions, decompose the N-by-N Gram matrix instead — 4565 times faster at D equal to 4000.
- And that matrix is built from inner products with no D in it, which is the whole of kernel PCA.
- Standardising is a decision: a change of unit costs 77.3982 degrees without it, and it throws away real information with it.
- Probabilistic PCA adds a generative story, which buys imputation, novelty scoring and a posterior covariance known before any data arrives — and recovers plain PCA as the noise-free limit.
Start here: Problem Setting
pch.coffeeTagline
pch.coffeeCtapch.feedbackHeading
pch.feedbackSubheading