Machine Learning

k-Means

Pick k centers, colour each point by its nearest one, move each center to the mean of its points, and repeat.

Click the canvas to add a point

—
—

iteration—
next step—
points—
status—

What to observe

  1. Press Step a few times. The two halves of the loop take turns: each center slides to the mean of its color, then every point is recolored to its nearest center.
  2. Hit Reset a few times on the same points. k-means can settle intodifferent groupings, because it finds a local minimum of J, not the global one.
  3. On Moons k-means insists on round, straight-edged clusters and cuts each crescent in half: the blind spot DBSCAN fixes.

Shortcuts:space run/pause · s step · r reset · f fullscreen