Skip to content

Implementation of locally constant (Nadaraya-Watson) and locally linear kernel regression with automatic bandwidth selection and adaptive kernel, compatible with sklearn.

License

Notifications You must be signed in to change notification settings

fardal/kernel_regression

 
 

Repository files navigation

kernel_regression

Implementation of locally constant (Nadaraya-Watson) and locally linear kernel regression with automatic bandwidth selection and adaptive kernel, compatible with sklearn.

Expanded from Jan Hendrik Metzen's kernel_regression package. Major code redundancies between routines that I've yet to clean up.

  • Improved numerical convergence of fit values far from training points
  • Allows validation on "parallel sample" rather than cross-validation, which is useful when some points would be dominated by own kernel

Note: the code is fairly rough, untested, and poorly documented, but is made public since I couldn't find any equivalent functionality elsewhere. Feel free to contact me with improvements.

Example of locally linear regression advantages in 1 and 2-d:

onecompare

twodcompare

About

Implementation of locally constant (Nadaraya-Watson) and locally linear kernel regression with automatic bandwidth selection and adaptive kernel, compatible with sklearn.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%