Interactive clustering with animated centroid updates
Chapter 22 · Clustering
K-Means alternates between two steps: assign each point to the nearest centroid, then update each centroid to the mean of its assigned points. The algorithm converges when no points change assignment. Use Step to watch each iteration, or Run to animate the full process.