$$D(p(x,y)\|q(x,y)) = D(p(x)\|q(x)) + D(p(y|x)\|q(y|x))$$ Cover & Thomas (2006), Theorem 2.5.3, eq. (2.67), p. 24, with the conditional relative entropy of eq. (2.65).
Value
Named list with estimate, marginal, conditional,
residual, n, method. residual is zero up to rounding.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Klchain(V, V)
#> $estimate
#> [1] 0
#>
#> $marginal
#> [1] 0
#>
#> $conditional
#> [1] 0
#>
#> $residual
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Chain rule for relative entropy -- Cover & Thomas (2006) eq. (2.67)"
#>
