R/tools_misc.R
H.Rd
Compute the entropy of a discrete sample
H(cl)
vector of discrete labels
the entropy of the sample
cl <- sample(2, 500, replace = TRUE) H(cl) #> [1] 0.6931392