Description Usage Arguments Details Value See Also
Kernels convert distance/ duration vectors to single numbers, with a certain weight for certain distances. In general, at 0 distance, these return a value of 1, and the value decreases as the distance increases, reaching 0 at the limit of the support.
1 2 3 4 5 | kernel_gaussian(d, r = 100, reduce_fun = sum)
kernel_parabola(d, r = 100, reduce_fun = sum)
kernel_uniform(d, r = 100, reduce_fun = sum)
|
d |
The vector of distances/ durations. |
r |
The radius of interest for the kernel to aggregate data. |
reduce_fun |
The reduce function used to aggregate data. |
Gaussian kernel is a truncated gaussian, where r = 4*sigma (i.e., std. dev = r/4).The density which is truncated away is 1 - erf(2 sqrt(2)), which is approximately 0.0000633. Parabola kernel is parabolic, decreasing with distance within radius r, and returns 0 elsewhere. It is a scaled Epanechnikov kernel. Uniform kernel returns 1 within radius r, 0 elsewhere.
numeric, function (usually sum) of kernel-weighted distances or durations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.