Chapter 2 · Machine learning basics
Dimensionality reduction
Squash many features into a few while keeping the shape of the data (PCA, t-SNE).
Chapter 2 · Machine learning basics
Squash many features into a few while keeping the shape of the data (PCA, t-SNE).
A flat shadow of the cloud from this angle: the groups overlap.
The points really live in 3D. The picture is their flat 2D shadow. A bad angle blurs the groups; the best angle keeps them apart.
Each feature is a dimension. A photo, a document or a customer can have hundreds. We cannot draw that, and models find it harder to learn from.
Rotate the cloud with the sliders and watch two scores: how much of the cloud's spread the shadow keeps, and how clearly the three groups stand apart. Then press the PCA button.
SquashedLittle of the cloud's spread survives, so the groups sit on top of each other.
Best possible flat view: keeps 100% of the spread. A simplified teaching version with thirty-six made-up points; PCA here is computed for real from the points.
What does PCA look for?
You flatten data from a bad angle. What happens?
Why reduce dimensions at all?