Fig. 2

Download original image
Schematic of k-means algorithm, dots are training examples, and triangles are cluster centroids. (a) Original dataset, (b) random initial cluster centroids, (c–f) illustration of running two iterations of k-means. In each iteration, each training example is assigned to the closest cluster centroid; then each cluster centroid is moved to the mean of the points assigned to it.