Skip to contents

$$R = 1 - H(X)/\log|A|$$ Shannon (1948), Section 7: "The ratio of the entropy of a source to the maximum value it could have while still restricted to the same symbols will be called its relative entropy ... One minus the relative entropy is the redundancy."

Usage

Redund(p, base = 2)

Arguments

p

Non-negative source pmf; closed to unit sum here.

base

Log base for the reported entropies; the redundancy is a ratio and does not depend on it.

Value

Named list with estimate, entropy, hmax, relative, n, method.

References

Shannon (1948), Section 7.

Examples

Redund(c(0.5, 0.5))
#> $estimate
#> [1] 0
#> 
#> $entropy
#> [1] 1
#> 
#> $hmax
#> [1] 1
#> 
#> $relative
#> [1] 1
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "Redundancy 1 - H/Hmax -- Shannon (1948) Sec. 7"
#>