Skip to contents

\(HSIC = tr(KHLH)/n^2\) with RBF Gram matrices and the centring matrix \(H\). Zero exactly under independence, which is what an additive-noise test needs: a nonlinear dependence can leave the correlation at zero while the variables remain fully dependent.

Usage

morie_hsic(a, b)

Arguments

a, b

Numeric vectors of equal length.

Value

A single non-negative numeric.

Details

Mirrors morie.fn.anmod's hsic.

Examples

set.seed(1)
morie_hsic(rnorm(100), rnorm(100))
#> [1] 0.003734602