Learn R Programming

shipunov (version 1.17.1)

Adj.Rand: Adjusted Rand index

Description

Adjusted Rand index to compare different clusterings

Usage

Adj.Rand(cl1, cl2, ...)

Value

Similarity: numerical vector of length 1

Arguments

cl1

First classification (character vector of group names)

cl2

Second classification

...

Further arguments to table()

Author

Alexey Shipunov

Details

Use 'useNA="ifany"' or similar option to take NAs as a separate class (for more explanations, see help for table() command).

Note that in rare cases, Adjusted Rand Index might become negative, this might be some evidence that differences between two partitions are "worse than random", i.e., there is a pattern in differences.

References

Hubert L. and Arabie P. 1985. Comparing partitions. Journal of Classification. 2. 193--218.

See Also

Misclass

Examples

Run this code
iris.dist <- dist(iris[, 1:4], method="manhattan")
iris.hclust <- hclust(iris.dist)
iris.3 <- cutree(iris.hclust, 3)
Adj.Rand(iris.3, iris[, 5])

Run the code above in your browser using DataLab