k-means clustering
Step 16 of 21 in Machine Learning · Build · Easy
Assign points to the nearest centre, move centres to their points' mean, repeat. Fast and simple, but assumes round clusters of similar size.
Build it
k-means + elbow
k-means++ from scratch; animate iterations on blobs; plot inertia vs k.
Done when: Elbow at the true k; you show a dataset where k-means fails.
Resources
- Wikipedia: K-means clustering Article
- scikit-learn: clustering Article
- ISLR / ISLP (free book) Book
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map