Compute the normalized mutual information of two discrete samples

NMI(cl1, cl2)

Arguments

cl1

vector of discrete labels

cl2

vector of discrete labels

Value

the normalized mutual information between the two discrete samples

Examples

cl1 <- sample(2, 500, replace = TRUE)
cl2 <- sample(2, 500, replace = TRUE)
NMI(cl1, cl2)
#> [1] 0.003782688