Skip to contents

Joint space uses the maximum norm (Eq. 6). Algorithm 1 (Eq. 8): I = psi(k) - <psi(nx+1) + psi(ny+1)> + psi(N), counting points with projected distance strictly less than the k-th joint neighbour distance. Algorithm 2 (Eq. 9): I = psi(k) - 1/k - <psi(nx) + psi(ny)> + psi(N), counting points inside the smallest rectangle holding the k joint neighbours. Both are provided; algorithm 1 is the default (the paper reports smaller statistical error for it at equal k). Units are nats.

Usage

morie_miest1(X, Y, k = 3, algorithm = 1)

Arguments

X, Y

Paired samples: vectors, or matrices with one row per observation.

k

Number of neighbours (1 <= k < n).

algorithm

1 (Eq. 8, default) or 2 (Eq. 9).

Value

A list with elements mi, mi_bits, k, algorithm, n, method.

References

Kraskov, A., Stogbauer, H. and Grassberger, P. (2004). Estimating mutual information. Physical Review E, 69, 066138.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_miest1(V, V)
#> $mi
#> [1] 1.092857
#> 
#> $mi_bits
#> [1] 1.57666
#> 
#> $k
#> [1] 3
#> 
#> $algorithm
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "KSG mutual information, Eq. 8 (Kraskov 2004)"
#>