K means A simple Ruby implementation of the K means algorithm. Usage points = [{x: 1, y: 2}, {x: 2, y: 3}, {x: 4, y: 5}] k = 2 iterations = 5 clusters = kmeans(points, k, iterations)