Skip to content
Prev 68380 / 398506 Next

algorithm used in k-mean clustering

Asha Jayanthi wrote:
help for all R functions available on your system can be viewed using 
?function_name - e.g. in your case ?kmeans displays the help for the 
kmeans function.

Doing this gives:

...
  centers: Either the number of clusters or a set of initial (distinct)
           cluster centres.  If a number, a random set of (distinct)
           rows in 'x' is chosen as the initial centres.

So the randomness you are experiencing is related to the choice of centers.

Search the archives of this mailing list as this question was asked 
recently - e.g. http://tolstoy.newcastle.edu.au/R/help/05/04/1692.html

Read all of ?kmeans as it has references for the algorithm used.

Gav