internalsGet Pro

Module 08 · Lesson 2 of 9Pro

k-means: grouping similar data points

Level
Beginner
Topic
Unsupervised learning
Reading time
14 min

When you finish this page you can

  1. Run k-means’ assign and update steps by hand on a few customers, and explain why inertia falls every step.
  2. Explain why k-means needs scaled features, a k-means++ start and several runs, and set n_init on purpose.
  3. Choose k from the elbow, the silhouette score and what the business can act on.
  4. Say when k-means draws the wrong groups, and when to switch to MiniBatchKMeans.

Builds on 3 lessons

Start with lesson 114 min
  1. Clustering: finding groups without labels14 min
  2. k-nearest neighbours: learning from similar examples14 min
  3. Gradient descent: walking downhill to a better model14 min

One rupee weighs the same as one order

is our example online store. Joseph leads its growth team. He wants to send different Diwali emails to different kinds of customers, but no column says which kind each customer is.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan