Skip to content

epanechnikovKernel

The Epanechnikov kernel, scaled to unit variance like the gaussian kernel so a bandwidth smooths about as much with either: 3 / (4√5) · (1 - u²/5) for |u| ≤ √5, otherwise 0. Its density reaches exactly zero √5 bandwidths past the outermost observations.

A parabola-shaped kernel scaled to unit variance, like gaussianKernel, so one bandwidth smooths about as much with either. Unlike the gaussian it reaches exactly zero √5 (about 2.24) bandwidths from an observation.

import {epanechnikovKernel} from "@d3plus/math";

epanechnikovKernel(0);
epanechnikovKernel(0.5);
epanechnikovKernel(1);
epanechnikovKernel(2);
epanechnikovKernel(2.3);

Parameters

import {epanechnikovKernel} from "@d3plus/math";
urequirednumber

The scaled distance from an observation.