Description Usage Arguments Value References Examples
J = \frac{n_{11}}{n_{11} + n_{10} + n_{01}}
.
Computes the cluster stability measure defined in Famili et.al based on the idea of cluster immovability on partition. Cluster immovability is the rate at which the content of a cluster remains unchanged during the clustering process.
1 | Stability(c1, c2)
|
c1 |
a vector of |
c2 |
a vector of |
the Jaccard coefficient for the two sets of cluster labels (See Details.)
Famili, A. Fazel, Ganming Liu, and Ziying Liu. "Evaluation and optimization of clustering in gene expression data analysis." Bioinformatics 20.10 (2004): 1535-1545.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# We generate K = 3 labels for each of n = 10 observations and compute the
# Jaccard similarity coefficient between the two clusterings.
set.seed(42)
K <- 3
n <- 10
labels1 <- sample.int(K, n, replace = TRUE)
labels2 <- sample.int(K, n, replace = TRUE)
jaccard_indep(labels1, labels2)
# Here, we cluster the iris data set with the K-means and
# hierarchical algorithms using the true number of clusters, K = 3.
# Then, we compute the Jaccard similarity coefficient between the two
# clusterings.
iris_kmeans <- kmeans(iris[, -5], centers = 3)$cluster
iris_hclust <- cutree(hclust(dist(iris[, -5])), k = 3)
jaccard_indep(iris_kmeans, iris_hclust)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.