Implements the classical kernel function and related functionals
K_b(b,x,y, K)
xK_b(b,x,y, K)
K_b_mat(b,x,y, K)Scalar values for K_b and xK_b and matrix outputs for K_b_mat.
A vector of design points where the kernel will be evaluated.
A vector of sample data points.
The bandwidth to use (a scalar).
The kernel function to use.
The function K_b implements the classical kernel function calculation
$$ h^{-1} K \left ( \frac{x-y}{h} \right )$$
for scalars \(x\) and \(y\) while xK_b implements the functional
$$ h^{-1} K \left ( \frac{x-y}{h} \right )(x-y)$$
again for for scalars \(x\) and \(y\). The function K_b_mat is the vectorized version of K_b. It uses as inputs the vectors \((X_1, \dots, X_n)\) and \((Y_1, \dots, Y_n)\) and returns a \(n \times n\) matrix with entries
$$ h^{-1} K \left ( \frac{X_i-Y_j}{h} \right )$$