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.

kernel_gaussian(d, r = 100, reduce_fun = sum)

kernel_parabola(d, r = 100, reduce_fun = sum)

kernel_uniform(d, r = 100, reduce_fun = sum)

Arguments

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.

Value

numeric, function (usually sum) of kernel-weighted distances or durations

Details

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.

See also