On Wed, 20 Feb 2002, David Wartel wrote:> > I have to solve a clustering problem. > My first step is to determinate the number of clusters, that's why I 'm using > the Calinski index ( [tr(b)/(k-1)]/[tr(w)/(k-1)] ) which i try to maximize > to have the best number of clusters. > A function is already implemented in R to calculate this index : > > clustIndex(cl,x, index="calinski")Where is that from? It's not part of R -- package cclust, perhaps?> where cl is the result of a clustering method , for instance: > > cclust(x,k,itermax,verbose=TRUE,method="kmeans") > > My probleme is that I can't calculate the Calinski's index when a cluster > contains only one datapoint : > > Error in cov(x[cluster == l, ]) : supply both x and y or a matrix-like xThe programmer forgot drop=FALSE, it would seem. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I have to solve a clustering problem. My first step is to determinate the number of clusters, that's why I 'm using the Calinski index ( [tr(b)/(k-1)]/[tr(w)/(k-1)] ) which i try to maximize to have the best number of clusters. A function is already implemented in R to calculate this index : clustIndex(cl,x, index="calinski") where cl is the result of a clustering method , for instance: cclust(x,k,itermax,verbose=TRUE,method="kmeans") My probleme is that I can't calculate the Calinski's index when a cluster contains only one datapoint : Error in cov(x[cluster == l, ]) : supply both x and y or a matrix-like x Is there a way to solve this? thanx for your help, David -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear all, I spent a long time today to find out why symbols( ) didn't display all my points. In fact, the function cannot display circles with a small radius when the range of radii is too large, whereas circles with radius=0 are drawn as dots! here are a simple examples:> symbols(sample(1:8),sample(1:8),circle=c(1,4,88,0,0,0,0,50),inches=0.2)#plots 6 circles> symbols(sample(1:8),sample(1:8),circle=c(0,0,88,0,0,0,0,50),inches=0.2)#plots 8 circles this looks quite illogical to me, should it be considered as a bug? I don't think it is of use, however: I did this in R 1.3.0 and 1.4.1 both running on Windows 95 thomas -- ------------------------------------ Thomas de Cornulier CEBC-CNRS 79360 Villiers en Bois (0033) 5 49 09 61 11 (heures bureau) (0033) 5 49 09 67 43 (soir) (0033) 6 20 66 07 84 (mobile) ------------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._