Skip to content
Prev 30534 / 398506 Next

kmeans clustering

Hi,                                                                                                                                 
                                                                                                                                    
It is expected!  If you read:                                                                                                       
  ?kmeans                                                                                                                           
For the "centers" argument:                                                                                                         
"...a random set of rows in `x' are chosen                                                                                          
          as the initial centers. "                                                                                                 
                                                                                                                                    
In other words the starting values are different.  In fact one should run                                                           
kmeans() several times to avoid local minimum.                                                                                       
                                               
If you run it, say, 20 times and you get the same results 15 times, then 
you can "probably" be confident to use that solution.
On Mon, 14 Apr 2003, pingzhao wrote: