Clustering example in ruby