Implement LOESS/LOWESS algorithm in Python/R

749 views Asked by At

Some questions raised while trying to write a python/r version of LOESS. I searched the web but did not get satisfied answer. The original C version wrote by Cleveland which proposed and described in his paper Cleveland (1979, 1988) can be found in R source code, however i'm not used to C code while the program is a bit complex which made it more difficult.

Most of implementations in other language do not have full functions of original LOESS, like predict function, described in Cleveland (1988), using interpolation functions. And the k-d tree method used (mentioned in that paper) is lost in those versions.
So, my questions are :

1.

The loess fit is evaluated at the cell vertices and then blending functions do the interpolation

(from manual of LOESS in R).

Then if I write a python/r version, how should the model stored? Each vertices store a fitted value, blending functions, edges (windows, cells or sth else)?

2. How to implement the predict() function of LOESS model? How the input data is predicted (first lookup the data which window it belong then calc the value using blending functions)?

0

There are 0 answers