Skip to contents

$$H(X,Y) = -\sum p(x,y)\log p(x,y)$$ Cover & Thomas (2006), eq. (2.15), p. 17.

Usage

Jntent(pxy, base = 2)

Arguments

pxy

Joint pmf as a matrix or list of rows; normalised here.

base

Log base; 2 gives bits.

Value

Named list with estimate, hx, hy, n, method.

References

Cover & Thomas (2006), eq. (2.15).

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Jntent(V)
#> $estimate
#> [1] 2.794209
#> 
#> $hx
#> [1] 2.794209
#> 
#> $hy
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Joint entropy H(X,Y) -- Cover & Thomas (2006) eq. (2.15)"
#>