Learn R Programming

shallot (version 0.4.1)

adj.rand.index: Adjusted Rand Index

Description

This function calculates the adjusted Rand index between two clusterings/partitions.

Usage

adj.rand.index(c1, c2)

Arguments

c1

A vector containing cluster labels for a clustering/partition.

c2

A vector containing cluster labels for a clustering/partition.

Value

A numeric vector of length one representing the adjusted Rand index between the two clusterings/partitions.

Details

The adj.rand.index function takes as its input two clusterings/partitions in cluster label notation and computes the adjusted Rand index. The adjusted Rand index is at most 1.0 and large numbers indicate high similarity.

References

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

See Also

estimate.partition

Examples

Run this code
# NOT RUN {
truth    <- c(1,1,2,2,2,1,3,3,3)
estimate <- c(1,2,2,2,2,1,2,3,3)
adj.rand.index(truth,estimate)
# }

Run the code above in your browser using DataLab