| compare.jaccard | R Documentation |
Comparison of two sets of clusters, using Jaccard index
compare.jaccard(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.
the Jaccard index on pairs – the pairs both
partitions group together, over the pairs at least one of them groups. Unlike the Rand index
of compare.accuracy it ignores the pairs both keep apart, a cell that
dominates as soon as there are many clusters: 150 singletons out of 150 observations score
0.67 with the Rand index and 0 here.
compare.accuracy, compare.kappa, compare
require (datasets)
data (iris)
km = KMEANS (iris [, -5], k = 3)
compare.jaccard (km$cluster, iris [, 5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.