The algorithm always converges (by definition), but not necessarily to a global optimum .
The algorithm may switch from a centroid to a centroid, but this is an algorithm parameter ( precisionor delta). This is sometimes called "cyclic." After some time, the algorithm passes through centroids. There are two solutions (both of them can be used simultaneously). precision, maximum number of iterations.
precision, delta, .
Max Num Iterations, , .
, . - , ( , ).
stats.SE k-