English: Convergence of k-means clustering from an unfavorable starting position (two initial cluster centers are fairly close). Generated with en:ELKI.
Deutsch: Konvergenz von k-means clustering, mit einer vergleichsweise ungünstigen Ausgangsposition. Mit en:ELKI erzeugt.
The k-means process is interrupted at each iteration after updating the means. The Voronoi cells (black lines) are drawn with the new means, but the points labels are still from the previous iteration (i.e. assigned to the closest mean of the previous iteration). This is why the black lines are already one iteration ahead (the Voronoi cells are only computed in visualization, k-means does not compute them). This can be a bit irritating, but it is a fact that the result, until converged, is never completely consistent: either points are not assigned to the nearest center, or the center is not the mean of the assigned points. Once we have both properties, it has converged.
If I would interrupt k-means before updating the mean, then the centers would appear to be off (but that is not as easy to spot).
{{Information |Description ={{en|1=Convergence of k-means clustering from an unfavorable starting position (two initial cluster centers are fairly close). Generated with en:ELKI.}} {{de|1=Konvergenz von k-means clustering, mit einer vergleichsw...