{"id":48549421,"url":"https://github.com/yaniv-shulman/rsklpr","last_synced_at":"2026-04-08T08:00:57.933Z","repository":{"id":207894732,"uuid":"695010042","full_name":"yaniv-shulman/rsklpr","owner":"yaniv-shulman","description":"Robust locally weighted multiple regression in Python","archived":false,"fork":false,"pushed_at":"2026-04-08T06:03:03.000Z","size":69165,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-08T08:00:23.364Z","etag":null,"topics":["least-square-regression","locally-weighted-regression","machine-learning","mit-license","polynomial-regression","python","python3","regression","robust-regression","robust-statistics","statistics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaniv-shulman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-22T06:54:28.000Z","updated_at":"2026-04-08T05:52:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e759711-4994-4921-b775-ecd6c920619f","html_url":"https://github.com/yaniv-shulman/rsklpr","commit_stats":null,"previous_names":["yaniv-shulman/rsklpr"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/yaniv-shulman/rsklpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaniv-shulman%2Frsklpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaniv-shulman%2Frsklpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaniv-shulman%2Frsklpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaniv-shulman%2Frsklpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaniv-shulman","download_url":"https://codeload.github.com/yaniv-shulman/rsklpr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaniv-shulman%2Frsklpr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31545905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["least-square-regression","locally-weighted-regression","machine-learning","mit-license","polynomial-regression","python","python3","regression","robust-regression","robust-statistics","statistics"],"created_at":"2026-04-08T08:00:29.745Z","updated_at":"2026-04-08T08:00:57.921Z","avatar_url":"https://github.com/yaniv-shulman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robust Local Polynomial Regression with Similarity Kernels #\n\n[![Downloads](https://static.pepy.tech/badge/rsklpr)](https://pepy.tech/project/rsklpr) ![Tests](https://github.com/yaniv-shulman/rsklpr/actions/workflows/linting_and_tests.yml/badge.svg?branch=main) [![Pyversions](https://img.shields.io/pypi/pyversions/rsklpr.svg?style=flat-square)](https://pypi.python.org/pypi/rsklpr)\n\n## TL;DR ##\nThis library is useful to perform robust locally weighted regression (similar to [LOESS](https://en.wikipedia.org/wiki/Local_regression)) in Python when:\n1. There are no particular assumptions on the underlying function except that it is \"reasonably smooth\". In particular,\nyou don't know which parametric model to specify or if an appropriate model exists. \n1. There are no particular assumptions on the type and intensity of noise present. Note that the estimator is biased\nif the data has non-Gaussian density around the mean. However, it works very well in practice if the data is not very\ndense. Use LOESS if you have very dense data.\n1. There are no particular assumptions on the presence of outliers and their extent.\n1. You may want to predict in locations not explicitly present in the dataset but also not too far from existing\nobservations or far outside the areas where observations exist. \n1. The independent inputs are univariate or multivariate.\n1. The dependent variable is univariate.\n1. You want a straightforward hassle-free way to tune the model and the smoothness of fit.\n1. You may want to calculate confidence intervals.\n1. You may want to filter noise to recover the original underlying process.\n1. You may want to impute or resample the data. \n\nIf the above use cases hold then this library could be useful for you. Have a look at this notebook\nhttps://nbviewer.org/github/yaniv-shulman/rsklpr/tree/main/docs/usage.ipynb for an example of how to use\nthis library to perform regression easily.\n\n## Installation ##\nInstall from [PyPI](https://pypi.org/project/rsklpr/) using pip (preferred method):\n```bash\npip install rsklpr\n```\n\n### What's new? ###\n- Version 2.0.0: \n  - Improved numerical stability.\n  - Generalize the API for arbitrary kernels.\n  - Support for disabling the robust KDE based kernel. This allows using the library as a standard local polynomial\n    regression implementation with various kernels.\n  - Implementation of additional of the shelf kernels.\n  - Supporting arbitrary polynomial degree for local fitting.\n- Version 1.0.0 - Dropped support for Python 3.8 and added support for Python 3.12.\n- Version 0.7.0 - Metrics including local R-Squared and more efficient computation of WLS. \n- Version 0.6.0 - Bootstrap inference and confidence intervals\n\n## Details ##\nLocal polynomial regression (LPR) is a powerful and flexible statistical technique that has gained increasing popularity\nin recent years due to its ability to model complex relationships between variables. Local polynomial regression\ngeneralizes the polynomial regression and moving average methods by fitting a low-degree polynomial to a nearest\nneighbors subset of the data at the location. The polynomial is fitted using weighted ordinary least squares, giving\nmore weight to nearby points and less weight to points further away. Local polynomial regression is however susceptible\nto outliers and high leverage points which may cause an adverse impact on the estimation accuracy. This library \nimplements a variant of LPR presented in the \n[Robust Local Polynomial Regression with Similarity Kernels paper](https://arxiv.org/abs/2501.10729) which uses a\ngeneralized similarity kernel that assigns robust weights to mitigate the adverse effect of outliers in the local\nneighborhood by estimating and utilizing the density at the local locations.\n\n**BibTeX formatted citation**:\n```\n@misc{shulman2025robustlocalpolynomialregression,\n      title={Robust Local Polynomial Regression with Similarity Kernels}, \n      author={Yaniv Shulman},\n      year={2025},\n      eprint={2501.10729},\n      archivePrefix={arXiv},\n      primaryClass={stat.ME},\n      url={https://arxiv.org/abs/2501.10729}, \n}\n```\n### Experimental results ###\nThe experimental results and demonstration of the library for various experimental settings are available as interactive\nJupyter notebooks at https://nbviewer.org/github/yaniv-shulman/rsklpr/tree/main/src/experiments/\n\n### KDE Implementation ###\nKDE implementation is a copy of the code from statsmodels https://www.statsmodels.org/stable/index.html. The copy is done to\nremove statsmodels as a dependency of this package since statsmodels is quite heavy and pulls a lot of additional\npackages.\n\n## Contribution and feedback ##\nContributions and feedback are most welcome both to the paper and the code. Please see [CONTRIBUTING.md](https://github.com/yaniv-shulman/rsklpr/tree/main/CONTRIBUTING.md) for\nfurther details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaniv-shulman%2Frsklpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaniv-shulman%2Frsklpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaniv-shulman%2Frsklpr/lists"}