Elbow Method: Runs full K-Means at every K from 2 to 8 and plots the resulting WCSS — the "elbow" bend suggests a good K.
This is a from-scratch, flat 2D companion to the 3D K-Means simulation. Click anywhere on the canvas to drop a data point, or generate a random blob dataset, then step through — or run to convergence — a real Lloyd's-algorithm K-Means implementation: centroid initialisation, nearest-centroid assignment by squared Euclidean distance, and mean-recompute centroid updates, repeated until assignments stop changing.
The sidebar's Elbow Method panel is not decorative: it actually re-runs K-Means from scratch for every K from 2 to 8 on the current dataset and plots the resulting within-cluster sum of squares (WCSS), so the bend in the bars reflects a genuine computation rather than a canned curve.
How is this different from the 3D version?
Same algorithm, flat 2D canvas rendering instead of a WebGL/Three.js scene — lighter weight, and the cluster regions are drawn as a simple 2D nearest-centroid tint rather than a shader-based Voronoi field.
Is the elbow chart real?
Yes. Pressing Generate Blobs (or clicking points) recomputes it by running an independent, full K-Means to convergence for each K from 2 to 8 and recording the final WCSS — nothing is precomputed or faked.
What does convergence mean here?
The algorithm stops automatically the moment no point's cluster assignment changes between one iteration and the next — the mathematical definition of convergence for Lloyd's algorithm, not a fixed iteration count.