k-Means Clustering
Sometimes you have data but no answers to learn from. k-means finds groups in such data by itself. A shop can use it to group customers, and a company can use it to place delivery hubs.
New words
- Cluster
- A group of points that sit close to each other.
- Centroid
- The centre of a cluster. It is the mean of its points.
- k
- The number of clusters you ask k-means to find.
- Unsupervised learning
- Learning from data that has no labels or answers.
- Elbow
- The bend in a graph where adding more clusters stops helping much.
- Scaling
- Changing columns to a similar range so none of them dominates.
What you will learn
- Where would you put 3 delivery hubs?
- What is a centroid, and how far is a point?
- Step 1: give every point to its nearest centre
- Step 2: move every centre to the middle of its group
- When does it stop?
- Try it: watch the centres move
- How do you choose k?
- Bad starting points and other limits
- Common mistakes
- Explain it to a friend
- Key takeaways
10 quiz questions at the end.
The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.