Compare e-means with Lloyd k-means on 2D synthetic distributions
Note: e-means runs here with dead-cluster revival switched off, because on very low-dimensional data such as these 2-D sets revival degrades its results. Lloyd still re-seeds empty clusters as usual. Initialization is done with random sampling from the dataset. The batch size used is B/8, where B is the batch given by the default scaling law. The animation is smoothed, but the training times are measured faithfully (see the source code).
On phones and tablets this page keeps runs small, so that the tab fits in a phone's memory and a run takes about a minute: n stops at about 300,000 points, a run may do at most 3 times the work of the default one (n × k × all epochs up to 4.5 billion), and training uses at most 4 threads. None of this changes the results. For bigger runs, use a computer.
Thanks to Theo Vincent for the idea of this 2D playground, and to Hector Garcia Rodriguez and Loic Cabannes for their feedback.