Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


HDLSSkST (version 2.1.0)

randfun: Rand Index

Description

Measures to compare the dissimilarity of exact cluster labels (memberships) and estimated cluster labels (memberships) of the observations.

Usage

randfun(lvel, dv)

Arguments

lvel

exact cluster labels of the observations

dv

estimated cluster labels of the observations

Value

a single value between 0 and 1

References

William M Rand (1971). Objective criteria for the evaluation of clustering methods, Journal of the American Statistical association, 66(336):846-850, doi:10.1080/01621459.1971.10482356.

Examples

Run this code
# NOT RUN {
   # Measures of dissimilarity:
   exl <- c(rep(0,5), rep(1,5), rep(2,5), rep(3,5))
   el <- c(0,0,1,0,0,1,2,1,0,1,2,2,3,2,2,3,2,3,1,3)
   randfun(exl,el)

   ## outputs:
   #[1] 0.2368421
# }

Run the code above in your browser using DataLab