← 🧭 Data Science

🧭 PCA Lab

PC1 variance:
PC2 variance:
PC3 variance:
Variance retained:
Reconstruction error:
FPS:
PC1 (most variance)
PC2
PC3 (usually dropped)
Drag — rotate · Scroll — zoom

🧭 PCA and Dimensionality Reduction: Finding the Directions That Matter

A correlated 3D data cloud with its principal axes computed live in the browser via eigendecomposition of the covariance matrix, letting you drag a slider and watch every point collapse onto a lower-dimensional summary.

🔬 What It Demonstrates

PCA rotates the data onto new, uncorrelated axes ranked by how much variance each one explains. Keeping only the top axes gives the best possible lower-dimensional approximation of the data in a least-squares sense.

🎮 How to Use

Choose how many components to keep, then drag the reduction blend slider to morph points from their true position onto that subspace. Adjust axis correlation and variance flatness to see how the principal axes and the variance they capture change.

💡 Did You Know?

Points that turn brighter rose as you increase the blend are the ones losing the most information — their true position sits farthest from the kept subspace, which is exactly the quantity PCA minimizes in aggregate.