Module 03 · Lesson 12 of 12Pro
PCA: keeping the directions that matter
- Level
- Intermediate
- Reading time
- 17 min
When you finish this page you can
- Turn a table of overlapping features into a few uncorrelated directions by centring, scaling and finding the covariance matrix’s eigenvectors.
- Read explained variance to see how much of the data each direction keeps, and choose how many to keep with a validation score.
- Fit scikit-learn’s PCA on training rows only, inside a pipeline, and reuse that one fit everywhere.
- Spot when PCA throws away the signal a model needed, because it never looks at the label.