Skip to content
Prev 82026 / 398503 Next

k-means / role of 'nstart'

On Fri, 2 Dec 2005, Charles Raux wrote:

            
The code works as documented.  It tries 'nstart' random starts, 
but reports (as it says)

      The data given by 'x' is clustered by the k-means method, which
      aims to partition the points into k groups such that the sum of
      squares from points to the assigned cluster centres is minimized.

that is the clustering with the smallest value of the criterion.

You could just read the code for the details.