← back to tools

K-Means Store Clustering

Click the canvas to drop "stores" (x = foot traffic, y = avg basket size). Pick k and step through Lloyd's algorithm to watch the centroids converge — the same unsupervised segmentation I ran on 250+ retail stores before building cluster-specific forecasters.

Points
0
Iteration
0
Inertia
Status
waiting

Tip: click the canvas to add stores. Centroids (diamonds) are initialised with k-means++.

Under the hood: k-means++ seeding, then Lloyd's algorithm — (1) assign each point to nearest centroid, (2) recompute centroid = mean of assigned points, repeat until assignments stop changing. Inertia = Σ ‖xᵢ − μc(i)‖². Run it a few times: k-means is sensitive to initialization, which is why k-means++ exists.