Machine Learning
Math · Advanced · Lesson 3 of 8

Finding Clusters

k-means

An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.

What you’ll learn

  • k-means: assign points to the nearest centre, move centres to the means, repeat.
  • It always settles, but possibly on a local optimum: restart several times.
  • Choose k with care; the elbow of the inertia curve is a guide.

Steps

  1. No labels at all
  2. Watch it run
  3. Move the centre
  4. How many clusters?
  5. Unlucky starts
  6. Inertia by hand