Calculate centroid ...

- Place K points into the space represented by the objects. These points represent initial group of centroids.
- Assign each object to the group that has the closest centroid.
- When all objects have been assigned, recalculate the positions of the K centroids.
- Repeat Steps 2 and 3 until the centroids no longer move.

Write an implementation of K-Means …