k-means algorithm python
no vote
KMeans
Attempting to build a fast, memory efficient K-Means program.
Install
gem sources -a http://rubygems.org
sudo gem install k_means
How To Use
require 'rubygems'
require 'k_means'
data = [[1,1], [1,2], [1,1], [1000, 1000], [500, 500]]
kmeans = KMeans.new(data, :centroids => 2)
kmeans.inspect # Use kmeans.view to get hold of the un-inspected array
=> [[3, 4], [0, 1, 2]]
Custom Cen