shannon_cond_mutual_info: Shannon Conditional Mutual Information

Description Usage Arguments Value Examples

View source: R/shannon.R

Description

Compute the base-b conditional mutual information given joint p_xyz and marginal p_xz, p_yz, p_z distributions.

Usage

1
shannon_cond_mutual_info(p_xyz, p_xz, p_yz, p_z, b = 2)

Arguments

p_xyz

Dist specifying the joint distribution.

p_xz

Dist specifying the x,z-marginal distribution.

p_yz

Dist specifying the y,z-marginal distribution.

p_z

Dist specifying the z-marginal distribution.

b

Numeric giving the base of the logarithm.

Value

Numeric giving the Shannon conditional mutual information.

Examples

1
2
3
4
5
6
xyz <- Dist(c(24, 24, 9, 6, 25, 15, 10, 5))
xz  <- Dist(c(15, 9, 5, 10))
yz  <- Dist(c(9, 15, 10, 15))
z   <- Dist(c(3, 5))
shannon_cond_mutual_info(xyz, xz, yz, z)           # 0.1259494
shannon_cond_mutual_info(xyz, xz, yz, z, b = 3)    # 0.0794652

rinform documentation built on April 1, 2018, 12:12 p.m.