[R] Clustering and Calinski's index
David Wartel
dwartel at ulb.ac.be
Wed Feb 20 17:37:27 CET 2002
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list