A simple Ruby gem for parallelized k-means clustering. Parallelization is done with the aid of Cabiri.
Install the gem at the command prompt:
gem install kmeans-clustering
See the example.rb file for a practical example. It should be pretty straightforward to adapt this code to your needs. Keep in mind that the calcDistanceSquared function is called a lot by the k-means clustering algorithm, so its code should ideally be kept simple.