Skip to contents

Shannon entropy for multivariate discrete data

Usage

H(px)

Arguments

px

a vector of positive numbers sum to 1

Value

a non-negative number

Examples


H(c(0.5,0.3,0.2))
#> [1] 1.029653