DS701 Session 15 — Mon Oct 26, 2026
What is the very first step of PCA, and in one sentence, why is it required?
If the centered data matrix has SVD \(X = U\Sigma V^T\), where do the principal components live, and how do the singular values relate to the eigenvalues of the covariance matrix \(S\)?
Name two things you should not conclude from a t-SNE plot, and one thing t-SNE genuinely does preserve.

The sum of variances of the projected points is a maximum.

The sum of residuals (squared distances from points to the line) is a minimum.
These are the same optimization: for centered data, projected² + residual² is a fixed total, so maximizing one minimizes the other.
Step 3 is legal because \(S\) is real symmetric — that is what guarantees real eigenvalues and perpendicular principal directions.
Rotation, then projection.
Intuition: find the “best viewing angle.” Data that is a pancake in 3D really lives in a 2D plane — \(V'\) orients that plane, \(Y\) gives coordinates inside it.
\[X = U\Sigma V^{T} \quad\Longrightarrow\quad X^{T}X = V\Sigma^{2}V^{T}\]
Nobody forms \(S\) and eigendecomposes it. Reasons: numerical stability (squaring \(X\) squares the condition number), efficiency (truncated SVD gets just the top \(d\)), and it hands you \(V\) directly.
Total variance \(T = \lambda_1 + \lambda_2 + \dots + \lambda_n\).
Caution: variance \(\ne\) usefulness. A low-variance direction can still be the one that separates your classes.
Same four people, height in feet vs. centimeters:

Height in feet — variance runs horizontally (age).

Height in cm — variance now runs vertically.

Standardized — variance shared evenly.
Variance is unit-dependent, so PCA is not scale-invariant. Standardizing means you are doing PCA on the correlation matrix — best practice whenever features have different units or scales.

The asymmetry is the point: heavy t-distribution tails let a moderate 2D distance stand in for a large high-D distance, relieving the crowding problem.
| Feature | PCA | t-SNE |
|---|---|---|
| Speed | Fast | Slow (>10k points hurts) |
| Purpose | Dimensionality reduction | Visualization |
| Preserves | Global variance | Local neighborhoods |
| Linear? | Yes | No |
| Deterministic? | Yes | No (random init) |
| Distances | Meaningful | Not meaningful |
| Reusable transform? | Yes | No |
Best practice: PCA down to ~50 dimensions first, then t-SNE.
Don’t trust
Do
“Cluster A is bigger than B and far from C, so A and B are related” — every part of that sentence is unsupported.
Goal: run the full PCA pipeline yourself (standardize, choose \(d\) from explained variance, reconstruct, verify against the SVD), then stretch: run t-SNE at four perplexities and two seeds, and put a number on “local neighborhoods are preserved” while cluster sizes and gaps are not.
The activity notebook goes live on the day of the lecture. Colab is optional — you can also open it on GitHub and run it locally.
Full lecture notes: Dimensionality Reduction — PCA + t-SNE
Prerequisite refresher: Eigendecomposition