| compare.kappa | R Documentation |
Comparison of two sets of clusters, using kappa
compare.kappa(clus, gt, comp = c("max", "pairwise", "cluster"))
clus |
The extracted clusters. |
gt |
The real clusters. |
comp |
How the two partitions are compared. |
A numeric value indicating how much the two sets of clusters are similar.
Cohen's kappa on the fourfold table of pair
agreements, i.e. the Rand index of compare.accuracy corrected for the
agreement expected by chance. That quantity is also the Hubert-Arabie adjusted Rand
index – a theorem of Warrens (2008), not a substitution.
Warrens, M.J. (2008). On the Equivalence of Cohen's Kappa and the Hubert-Arabie Adjusted Rand Index. Journal of Classification, 25(2), 177-183.
compare.accuracy, compare.jaccard, compare
require (datasets)
data (iris)
km = KMEANS (iris [, -5], k = 3)
compare.kappa (km$cluster, iris [, 5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.