gforce.metrics {GFORCE} | R Documentation |
This can be used for either data or variable clustering. Cluster names can be either strings or numbers. Arbitrary data types cannot be used.
gforce.metrics(true_clust, est_clust, method = "purity")
true_clust |
length d vector of cluster assignments. This represents the true, or reference, clustering. |
est_clust |
length d vector of cluster assignments. This represents the estimated clustering. |
method |
the method used to evaluate the quality of the clustering solution |
Returns a numeric that represents the value of the chosen metric on the two clusterings true_clust
and est_clust
.
clust1 <- c(1,1,1,2,2,2,3,3,3) clust2 <- c(1,1,2,1,2,2,3,3,3) gforce.metrics(clust1,clust2,method='purity')