Clustering Snapshots

The 2D clustering example at the end of the assignment page looks like this initially. All of the points are shown in blue because they're all part of the same cluster initially — they haven't been clustered around the initial centers yet. The user-specified centers are shown in black:
After one iteration, the points are now partitioned into three clusters. Each point was assigned to the cluster whose center point in the graph above was closest, then the center points were updated to be at the center of "their" points. The center of the blue cluster might look like it's not in the center of the blue points, but there's a pretty dense "line" of blue points along the boundary with the red cluster that are shifting the center in their direction:
There's still a pretty substantial shift between the previous snapshot and the one below. The blue cluster captured some formerly red points, and the red cluster now includes some points that were yellow in the snapshot above. The centers then shift accordingly:
This snapshot looks identical to the one above, but it's not quite. One last red point changed to blue, and the blue and red centers shifted up and to the right a bit as a result. This is a stable solution though — no points get relabeled in the next iteration, and the next update to the center positions finds them within 0.0001 of their current positions so the process stops.


Brad Richards, 2024