Skip to main content

gaussian_mi

Function gaussian_mi 

Source
fn gaussian_mi(x: &[Vec<f64>], y: &[Vec<f64>]) -> f64
Expand description

Gaussian mutual information MI(X;Y) = 0.5 (log|Cov_X| + log|Cov_Y| - log|Cov_XY|).

The covariances are symmetric positive-definite (regularised with eps on the diagonal), so each log-determinant is taken from a Cholesky factor (2 Σ log Lᵢᵢ). Summing log-determinants is numerically stable where the former product/ratio of raw determinants would underflow for larger channel counts.