/aalr

Anomaly-aware local regression

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Synopsis

aalr -- anomaly-aware local regression

A Python module to perform local regression on noisy data with the awareness that some of the input data points may contain anomalies.

Illustration

The regressor (orange line) converges iteratively to the smooth component in the input signal (blue). Pink-shaded window or mask in the background indicates anomalous input found during the current iteration.

animation

Usage

The SplineModel class largely follows the interface of scipy's LSQUnivariateSpline, which is also the underlying local regression method used in the default case. The refine() method, initiates the iterative improvement.