entropy: Entropy

Description Usage Arguments Examples

View source: R/entropy.R

Description

Estimates uncertainty in univariate probability distribution.

Usage

1
entropy(x, bins)

Arguments

x

numeric or discrete data vector

bins

specify number of bins if numeric or integer data class.

Examples

1
2
3
4
5
6
7
# 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)

mlf documentation built on May 1, 2019, 10:34 p.m.

Related to entropy in mlf...