sainsc.utils.epanechnikov_kernel

sainsc.utils.epanechnikov_kernel(bw, *, dtype=np.float32)

Generate a 2D Epanechnikov kernel array.

\(K(x) = 1/2 * c_d^{-1}*(d+2)(1-||x||^2)\) if \(||x|| < 1\) else 0, where \(d\) is the number of dimensions and \(c_d\) the volume of the unit d-dimensional sphere.

Parameters:
  • bw (float) – Bandwidth of the kernel.

  • dtype (numpy.typing.DTypeLike, optional) – Datatype of the kernel.

Return type:

ndarray