To perform K-Means Clustering:

  1. Select points as initial cluster means (cluster centroids)
  2. Assign each point in the data to the cluster with the closest centroid.
  3. When all points have been assigned, recalculate the positions of the centroids.
  4. Repeat steps and until centroids no longer change.