[R] kmeans: "did not converge in 10 iterations"

Stephane CRUVEILLER scruveil at genoscope.cns.fr
Fri Mar 31 09:15:46 CEST 2006


On Thu, 2006-03-30 at 11:56 -0800, Linda Lei wrote:
> Hi All,
> 
>  
> 
> I run function "kmeans" to cluster a matrix. But when the matrix size is
> big enough, it keeps saying "did not converge in 10 iterations". Could
> you explain what it means and if the result is wrong? 
> 
It means that the partition obtained is not stable (i.e. the algorithm
did not converge
toward an optimal solution). Indeed, a supplementary iteration will
modify it significantly.

try to increase iter.max parameter (default set to 10)
$ x.kmeans<-kmeans(x,centers=3,iter.max=30) 

Stéphane.



>  
> 
> And the interesting thing is sometimes this warning happens when the
> sample size is around 51200 x 6, sometimes it happens around 30000 x 6.
> Does the warning related to sample size or not?
> 
>  
> 
> This also happens in "bclust".
> 
>  
> 
> Thank you!
> 
>  
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
-- 
==========================================================
Stephane CRUVEILLER Ph. D.
Genoscope - Centre National de Sequencage
Atelier de Genomique Comparative
2, Rue Gaston Cremieux   CP 5706
91057 Evry Cedex - France
Phone: +33 (0)1 60 87 84 58
Fax: +33 (0)1 60 87 25 14
EMails: scruveil at genoscope.cns.fr ,scruvell at infobiogen.fr




More information about the R-help mailing list