Approximation: LOESS approximation

 

LOESS is a kind of linear weighted least square regression with tricube kernel.

 

That is,

 

where

 

All its offdiagonal terms are zeros while its diagonals are calculated by

 

  for 0<=u<=1

        otherwise

 

Here,

 

 

We calculate h form k-nearest neighbor distance. This k is usually set by

 

k=floor(*n)

 

given parameter alpha.

 

We modify the result of gird method in the following way:

where red points are the results from grid method.

 

As we increase the parameter of LOESS, the resulting curve tends to be dull.

 

As we decrease the parameter of LOESS, the resulting curve tends to fit to the data but

 

it may be too noisy when the parameter is smaller than or around 0.1.