ruby script for testing kmeans algorithm