cluster centers are shown as triangleswhile data points are shown as circles colors indicate cluster membership we specified that we are looking for three clustersso the algorithm was initialized by declaring three data points randomly as cluster centers (see "initialization"then the iterative algorithm starts firsteach data point is assigned to the cluster center it is closest to (see "assign points ( )"nextthe cluster centers are updated to be the mean of the assigned points (see "recompute centers ( )"then the process is repeated two more times after the third iterationthe assignment of points to cluster centers remained unchangedso the algorithm stops given new data pointsk-means will assign each to the closest cluster center the next example (figure - shows the boundaries of the cluster centers that were learned in figure - in[ ]mglearn plots plot_kmeans_boundaries(clustering