powered by
Estimates uncertainty in univariate probability distribution.
entropy(x, bins)
numeric or discrete data vector
specify number of bins if numeric or integer data class.
# NOT RUN { # Sample numeric vector a <- rnorm(25, 80, 35) mlf::entropy(a, bins = 2) # Sample discrete vector b <- as.factor(c(1,1,1,2)) mlf::entropy(b) # }
Run the code above in your browser using DataLab