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.
The two crowds are almost exactly the two diagnoses. Malignant samples sit on one side of PC1, benign on the other. PC1 alone keeps – of the spread and already separates them. PCA found the medical difference from the shape of the numbers, with no labels. That is why PCA is called unsupervised.
Scree and takeaway
read
The variance chart shows one strong first component, just as on the main 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.