Begin


assign each data point to the nearest cluster center.

Set the new cluster centroids based on the average (mean) position of each centroid point. EndWhile
