Computes a bandwidth (lengthscale) for RBF or Matern kernels using the specified method.
Details
"median": The median heuristic sets bandwidth to the square root of the median of pairwise squared distances. Robust default for most kernel tests (Gretton et al., 2012)."scott": Scott's rule:n^(-1/(d+4)) * sd_pooled. Good for density estimation but may undersmooth for testing.
See also
Other kernel primitives:
kernel_matrix(),
kernel_spec(),
resolve_bandwidth(),
weighted_hsic_stat()
