Description Usage Arguments Details Value
Stolen from the clusteval package as there is currently a bug with the package on CRAN where this function is not exported from the namespae of clusteval. Computes the Jaccard similarity coefficient of two clusterings of the same data set under the assumption that the two clusterings are independent.
For two clusterings of the same data set, this function calculates the Jaccard similarity coefficient of the clusterings from the comemberships of the observations. Basically, the comembership is defined as the pairs of observations that are clustered together.
1 | Jaccard(labels1, labels2)
|
labels1 |
a vector of |
labels2 |
a vector of |
The Jaccard similarity coefficient is defined as:
J = \frac{n_{11}}{n_{11} + n_{10} + n_{01}}
.
In the special case that the Jaccard coefficient results in 0/0, we define J = 0. For instance, this case can occur when both clusterings consist of all singleton clusters.
To compute the contingency table, we use the comembership_table
function.
the Jaccard coefficient for the two sets of cluster labels (See Details.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.