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.
k-means in Javascript:
http://code.google.com/p/hdict/source/browse/gae/files/kmeans.js
http://www.mymessedupmind.co.uk/index.php/javascript-k-mean-algorithm
Applet:
http://www.math.le.ac.uk/people/ag153/homepage/KmeansKmedoids/kmeans.jar
In node and the browser:
https://github.com/harthur/clusterfck
You have a choice between k-means or hierarchical clustering with these distance functions:
- euclidean
- manhattan
- max
Simple K-Means implementation:
dimas-kmeans
var kmeans = require('dimas-kmeans')
var clusters = kmeans.getClusters(data);