PCA Visualizer

Drag the points and watch the principal components follow. Scree plot, explained variance, loadings, and the residuals a one-component projection throws away.

Please verify you are human to use the visualiser.

Variance, Eigenvectors and What a Reduction Costs

Centring

PCA measures variance about the mean, so the cloud is centred before anything else happens. Move the whole cloud and the components do not change.

Eigenvectors

The components are the eigenvectors of the covariance matrix and the variance along each is its eigenvalue. Symmetry is what makes them perpendicular.

Explained Variance

Each eigenvalue divided by their sum is the share of variance that component carries. The scree plot is those shares, and it is how many components to keep is decided.

Scale Sensitivity

Variance carries units, so an axis measured in hundreds dominates one measured in tenths. Standardising removes that, at the cost of treating every axis as equally important.

Reading the Presets

The five clouds are chosen so that the answer changes between them. The correlated cloud is the textbook case: one long direction, one short one, and a first component that carries most of the variance. The near-degenerate cloud pushes that to its limit, where the second eigenvalue is close to zero and dropping the component costs almost nothing. The round blob is the opposite, with two nearly equal eigenvalues, arbitrary axes, and a reduction that throws away half the information.

The three-cluster preset is the one worth sitting with. The first component runs along the line the groups are spread out on, and it looks as though PCA has found the groups. It has not. It found the direction of greatest variance, and the groups happen to lie along it. Move one cluster off that line and the component follows the variance wherever it goes.

For the matrix arithmetic underneath, our eigenvalue and SVD visualizer takes a covariance matrix directly and shows the same decomposition as a stretch of the unit circle, and the relationship between PCA and the SVD derives why the two give the same answer. The tutorial on principal component regression and partial least squares covers what happens when those components are then used as predictors, LDA against PCA is the supervised comparison for when the labels are known, and probabilistic PCA puts a likelihood behind the same decomposition. PCA is not the only way to reach two dimensions: Poincare embeddings change the geometry of the space instead of projecting inside it, and fit a tree in two dimensions that no linear projection can.

Dimensionality reduction is rarely the part of a project that fails. What decides it is whether the features carry the signal in the first place, and whether the evaluation would notice if they did not. Setting that up before the modelling budget is committed is our AI pilot design work, and reviewing a model someone else built is AI due diligence.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

PCA Visualiser FAQ

Common questions about principal components, scree plots and standardising