block by rpgove 073d6cb996d7de1d52935790139c4240

Kernel smoothing

Full Screen

Kernel smoothing is a method to estimate a smooth line from several discrete points, which is in contrast with kernel density estimation which is used to estimate a probability distribution from discrete points. This example uses the Nadaraya-Watson kernel-weighted average with a Gaussian kernel on random data that follows a noisey sine wave.

The smoothness is controlled by a bandwidth parameter. If the bandwidth is too small, the line essentially connects the existing data points. If the bandwidth is too large, then the line essentially becomes a straight line.

This method is usually fast if there are a small number of data points, but a tree structure can speed up the calculation if there is a lot of data.

index.html