k-means clustering implementation in Javascript? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this questionI'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);
精彩评论