Labs / Computer Science

K-Means Clustering

Pick how many clusters you want, then hit Step (or let it auto-run) to watch the algorithm work. Every round each point recolors to its nearest centroid, and every centroid slides to the average position of the points that chose it — repeat until nothing moves. Click empty space to drop in your own points.

Labs / Computer Science / K-Means Clustering

Computer Science20–30 minFoundation

K-Means Clustering

Pick how many clusters you want, then hit Step (or let it auto-run) to watch the algorithm work. Every round each point recolors to its nearest centroid, and every centroid slides to the average position of the points that chose it — repeat until nothing moves. Click empty space to drop in your own points.

Why it matters

Why explore this?

Computer science turns clear rules into reliable processes. This model lets you step through those rules and see how each decision changes the result.