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?
What is the definition of "wrong" in cluster analysis? The warning (not error!) says the algorithm did not converge, i.e. stuff could have been changed in subsequent (not allowed) iterations or it never converges (which we do not know using 10 iterations only). So you should increase the number of max. allowed iterations in order to give the algorithm a chance to converge. > 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? Not only. You might want to read the help page and the references for the algorithm you are using. If the starting set of centers is chosen well, convergence might happen in a few iterations even for a big matrix, otherwise you might need some more. Uwe Ligges > > > This also happens in "bclust". > > > > Thank you! > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
