Interactive · Transfer test

The same tool, a different shape

On the main page PCA found a smooth gradient across countries. Here we run exactly the same method on very different data, and it finds something else: separate groups. This is the second thing PCA can reveal.

Intro

read

These numbers do not describe countries. Each row is one patient’s tumour sample, measured under a microscope: the size of the cell nuclei, how rough their edges are, and eight more shape measurements. There are 569 samples and 10 measurements each. Source: Breast Cancer Wisconsin (Diagnostic), UCI (CC BY 4.0).

The uncoloured cloud

look · unsupervised first

We standardise the 10 measurements and run PCA, exactly as before. Here are the samples on PC1 and PC2. We have not told PCA anything about diagnosis.

Look Look at the shape first. Do you see two groups?

The cloud is not one blob. It stretches into two crowds.

Reveal Now we colour each sample by its real diagnosis, which PCA never saw.

Scree and takeaway

read

The variance chart shows one strong first component, just as on the main page.

Two datasets, two shapes. Health data gave a gradient. Tumour data gives clusters. The method did not change at all. When you meet PCA in your own work, ask first: is it showing me a gradient, or groups? The variance explained and the picture will tell you.

← Back to the main PCA page

A third shape appears in the Day 4 lecture: the US yield curve, where PCA finds three named factors (level, slope, curvature). Gradient, clusters, factors: the same tool, three faces.

Oxford · United Kingdom Teaching CV
University of Oxford