
Visualizing K-Means equilibria - blackili
http://bl.ocks.org/blacki/ebba08223eba20b56b62
======
naftaliharris
Very neat to see the how the centroids move to the equilibria. Also
interesting to look at other point distributions to see what happens in more
pathological cases. (For the interested, I once made a kmeans visualization
[http://www.naftaliharris.com/blog/visualizing-k-means-
cluste...](http://www.naftaliharris.com/blog/visualizing-k-means-clustering/),
there is one in the sibling comment to this, and many others can be found with
a little googling).

------
sidthekid
Really nice. I had built something similar in Python and matplotlib [
[https://github.com/sidthekidder/kmeans-
visualize/blob/master...](https://github.com/sidthekidder/kmeans-
visualize/blob/master/examples/10.jpg) ]. Of course your implementation is
100x, and I gained a better understanding from reading the source.

------
1wheel
Nice set of images showing the result of tweaking different parameters:

[https://twitter.com/BlackiLi/status/689860531293941762](https://twitter.com/BlackiLi/status/689860531293941762)

------
mrcactu5
Bostock is really a master of his own language... and is very expressive with
it. Even as many (including myself) are grappling with the basics.

This particular algorithm seems to be related to the Voronoi Tesselation --
deciding which points get allocated to each of the k different centers

[http://bl.ocks.org/mbostock/4060366](http://bl.ocks.org/mbostock/4060366)

~~~
nantes
This one actually isn't Mike Bostock. It's just "hosted" via his `bl.ocks.org`
service. The code itself lives in a Gist[0].

The original author is blacki[1][2].

[0]
[https://gist.github.com/blacki/ebba08223eba20b56b62](https://gist.github.com/blacki/ebba08223eba20b56b62)
[1] [http://bl.ocks.org/blacki](http://bl.ocks.org/blacki) [2]
[https://github.com/blacki](https://github.com/blacki)

