Skip to main content
. 2014 Nov 24;7:829. doi: 10.1186/1756-0500-7-829

Figure 1.

Figure 1

K-means clustering algorithm. An example 2-cluster run is shown, with the clusters distinguished by color and the current cluster seeds marked by a starburst. In the first round, each point is assigned to its closest seed, and a new seed is chosen for each cluster based on the average of all points in that cluster. As a result, the blue cluster seed moves to the right side. In the second round, both cluster seeds drift to their correct locations, resulting in a proper division. Note that, after two rounds, the clusters have reached a steady-state, and would not change further through an infinite number of iterations.