med_sigma | R Documentation |
This function provides the most popular bandwidth of the Gaussian kernel, the median heuristic.
med_sigma(X, Y)
X |
The first samples. |
Y |
The second samples. |
Returns a numeric value, the median heuristic, which is the median of all pairwise distances among pooled observations, as a bandwidth of the kernel.
kerTests-package
, kertests
## Mean difference in Gaussian distribution.
d = 100
mu = 0.2
sam = 100
n = 200
set.seed(500)
X = matrix(rnorm(d*sam), sam)
Y = matrix(rnorm(d*sam,mu), sam)
sigma = med_sigma(X, Y) # median heuristic (bandwidth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.