Chapter 1: Classical ML
PCA: keeping the most spread
Many data sets have columns that say almost the same thing. PCA finds a few new columns that keep most of the spread, so models get smaller and faster. Interviewers ask what a component is, how many to keep and why you centre the data first.
What you will learn
- Say what a principal component is
- Choose the number of components from the explained-variance ratio
- Explain why data must be centred first
Key terms
- spread
- how far the values sit from their middle
- mean
- the average of one column
- centre the data
- subtract each column's mean, so the middle sits at (0, 0)
Prerequisites
Take Gaussian mixtures, EM and the silhouette first. It comes right before this lesson in the course.
Where this lesson picks up: In the clustering lesson, you grouped customers by how close their rows sit. That left a question: can we shrink the columns, so each row needs fewer numbers?
What comes next
One last label problem waits: what do you do with a customer who has not cancelled yet?
Next lesson: Capstone: churn with survival analysis
More lessons in this part
- Clustering: k-means, restarts and k-means++ 15 min
- Gaussian mixtures, EM and the silhouette 15 min
- Capstone: churn with survival analysis 16 min
Take the lesson
Short cards, one idea at a time, with quick checks as you go.