Learn R Programming

ChemometricsWithR (version 0.1.13)

AdjRkl: Adjusted Rand Index

Description

The Adjusted Rand Index is a measure of similarity for two groupings or clusterings. A value of 1 indicates total agreement.

Usage

AdjRkl(part1, part2)

Arguments

part1

First partitioning.

part2

Second partitioning.

Value

Number.

References

R. Wehrens. "Chemometrics with R - Multivariate Data Analysis in the Natural Sciences and Life Sciences". Springer, Heidelberg, 2011.

Examples

Run this code
# NOT RUN {
if (require("kohonen")) {
  data(wines, package = "kohonen")
  wines.dist <- dist(scale(wines))
  wines.sl <- hclust(wines.dist, method = "single")
  wines.cl <- hclust(wines.dist, method = "complete")

  AdjRkl(cutree(wines.sl, 4), cutree(wines.cl, 4))
} else {
  cat("Package kohonen not available.\nInstall it by typing 'install.packages(\"kohonen\")'")
}
# }

Run the code above in your browser using DataLab