Compute the entropy of a discrete sample
H(cl)
cl
vector of discrete labels
the entropy of the sample
cl <- sample(2, 500, replace = TRUE) H(cl)