powered by
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")
length \(d\) vector of cluster assignments. This represents the true, or reference, clustering.
length \(d\) vector of cluster assignments. This represents the estimated clustering.
the method used to evaluate the quality of the clustering solution est_clust. The three options are 'purity', 'perfect', 'misclassified-points'.
est_clust
'purity'
'perfect'
'misclassified-points'
Returns a numeric that represents the value of the chosen metric on the two clusterings true_clust and est_clust.
true_clust
# NOT RUN { 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') # }
Run the code above in your browser using DataLab