Skip to contents

The corpus copy only CALLS gCastle's hsic_test (ch. 13, p. 354) and prints no formula; the book's own citation for the criterion is Gretton et al. (2007). The estimator is the biased V-statistic tr(K H L H)/n^2 with RBF Gram matrices and the median-heuristic bandwidth, mirroring morie.fn.anmod.hsic. threshold is caller-supplied; no null distribution is simulated.

Usage

morie_hsicstat(a, b, sigma_a = NULL, sigma_b = NULL, threshold = 0.01)

Arguments

a, b

the two samples

sigma_a, sigma_b

RBF bandwidths; NULL uses the median heuristic

threshold

cutoff below which the samples are called independent

Value

list(hsic, nhsic, independent, n)

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_hsicstat(V, V)
#> $hsic
#> [1] 0.1098401
#> 
#> $nhsic
#> [1] 0.8787204
#> 
#> $independent
#> [1] FALSE
#> 
#> $n
#> [1] 8
#>