k-means clustering implementation in Javascript?

stephanos picture stephanos · Sep 10, 2011 · Viewed 13.8k times · Source

I'm in need for a Javascript implementation of the k-means clustering algorithm. I only have 1-dimensional data and rarely more than 100 items, so performance is not an issue.

PS: I could only find one but it seems extremely unsteady, resulting in completely different clusters on virtually every call.