Skip to main content

LOWESS Project

PyPI fastlowess (Python) CI

One LOWESS to Rule Them All
One LOWESS to Rule Them All

The fastest, most robust, and most feature-complete language-agnostic LOWESS (Locally Weighted Scatterplot Smoothing) implementation for Rust, Python, R, Julia, JavaScript, C++, Go, Java, and WebAssembly.

The lowess-project also offers bindings for Rust, Python, R, Julia, Node.js, WebAssembly, C++, Go, and Java — see the full repository.


Installation & Documentation

Currently available for R, Python, Rust, Julia, Node.js, WebAssembly, and C++. See the Installation Guide for detailed installation instructions.

📚 View the full documentation

GPU Backend

GPU acceleration (wgpu: Vulkan/Metal/DX12) is also supported for high-throughput batch smoothing. See the GPU Backend guide for details.


LOESS vs. LOWESS

Feature LOESS LOWESS (This Crate)
Polynomial Degree Linear, Quadratic, Cubic, Quartic Linear (Degree 1)
Dimensions Multivariate (n-D support) Univariate (1-D only)
Flexibility High (Distance metrics) Standard
Complexity Higher (Matrix inversion) Lower (Weighted average/slope)

Read more about how LOWESS works in the Concepts.

Note: For a LOESS implementation, use loess-project.


Why this package?

Speed

The lowess project beats the competition in terms of speed, whether in single-threaded or multi-threaded parallel execution. It is on average 200-327x faster than Python's statsmodels.lowess and 2-3x faster than R's lowess.

For more details on the performance comparison, see the Benchmarks page.

Robustness

This implementation is more robust than R's lowess and Python's statsmodels due to two key design choices:

MAD-Based Scale Estimation:

For robustness weight calculations, this crate uses Median Absolute Deviation (MAD) for scale estimation:

s = median(|r_i - median(r)|)

In contrast, statsmodels and R's lowess uses the median of absolute residuals (MAR):

s = median(|r_i|)
  • MAD is a breakdown-point-optimal estimator—it remains valid even when up to 50% of data are outliers.
  • The median-centering step removes asymmetric bias from residual distributions.
  • MAD provides consistent outlier detection regardless of whether residuals are centered around zero.

Boundary Padding:

This crate applies a range of different boundary policies at dataset edges:

  • Extend: Repeats edge values to maintain local neighborhood size.
  • Reflect: Mirrors data symmetrically around boundaries.
  • Zero: Pads with zeros (useful for signal processing).
  • NoBoundary: Original Cleveland behavior

statsmodels and R's lowess do not apply boundary padding, which can lead to:

  • Biased estimates near boundaries due to asymmetric local neighborhoods.
  • Increased variance at the edges of the smoothed curve.

Features

A variety of features, supporting a range of use cases:

Feature This package statsmodels R (stats)
Kernel 7 options only Tricube only Tricube
Robustness Weighting 3 options only Huber only Huber
Scale Estimation 2 options only MAR only MAR
Boundary Padding 4 options no padding no padding
Zero Weight Fallback 3 options no no
Auto Convergence yes no no
Online Mode yes no no
Streaming Mode yes no no
Confidence Intervals yes no no
Prediction Intervals yes no no
Cross-Validation 2 options no no
Parallel Execution yes no no
GPU Acceleration yes no no
no-std Support yes no no

Validation

All implementations are numerical twins of R's lowess:

Aspect Status Details
Accuracy ✅ EXACT MATCH Max diff < 1e-12 across all scenarios
Consistency ✅ PERFECT Multiple scenarios pass with strict tolerance
Robustness ✅ VERIFIED Robust smoothing matches R exactly

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for more information.

License

Licensed under MIT or Apache-2.0.

Citation

If you use this software in your research, please cite it using the CITATION.cff file or the BibTeX entry below:

@software{lowess_project,
  author = {Valizadeh, Amir},
  title = {LOWESS Project: High-Performance Locally Weighted Scatterplot Smoothing},
  year = {2026},
  url = {https://github.com/thisisamirv/lowess-project},
  license = {MIT OR Apache-2.0}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastlowess-3.2.1.tar.gz (643.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fastlowess-3.2.1-cp38-abi3-win_arm64.whl (330.0 kB view details)

Uploaded CPython 3.8+Windows ARM64

fastlowess-3.2.1-cp38-abi3-win_amd64.whl (353.0 kB view details)

Uploaded CPython 3.8+Windows x86-64

fastlowess-3.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (473.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

fastlowess-3.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (458.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fastlowess-3.2.1-cp38-abi3-macosx_11_0_arm64.whl (425.7 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fastlowess-3.2.1-cp38-abi3-macosx_10_12_x86_64.whl (441.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file fastlowess-3.2.1.tar.gz.

File metadata

  • Download URL: fastlowess-3.2.1.tar.gz
  • Upload date:
  • Size: 643.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fastlowess-3.2.1.tar.gz
Algorithm Hash digest
SHA256 e5f1e8bc1cf63140c236bb19d9d52168b03f7e4f0e9ecd26f22d45d1c92f2ecb
MD5 6ddb5bceec521335c4d217cfdfd7fd20
BLAKE2b-256 5a58136d221ecd466381192f88b9b017c3d1878187c8bc227babc559f2900257

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1.tar.gz:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlowess-3.2.1-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: fastlowess-3.2.1-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 330.0 kB
  • Tags: CPython 3.8+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fastlowess-3.2.1-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 8c9813c1df99e733b9ce325baa20ddc4d1f60e88909ab12a973b5a5edbfcd12f
MD5 03a1e4ccf8ae43da0ce69fa847e52b28
BLAKE2b-256 c9dc4bfb4a0a49361bcd61ea901d2833a3853f80a44611762cd50a88dcd6768b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1-cp38-abi3-win_arm64.whl:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlowess-3.2.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: fastlowess-3.2.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 353.0 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fastlowess-3.2.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e469b1e5daaa788d4e07d80d2b846ea4b62e28e3f7dbc872fb0330bab5334631
MD5 c82f6e0ea3e8bb6eb16e7bb6c659a077
BLAKE2b-256 504e8bf9cb00674c8afcd56e5e50e52d3ec4f09158eb92bead454eda6d5aa211

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1-cp38-abi3-win_amd64.whl:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlowess-3.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33319cd895c1faba3143a9053e1930d0ba99da88a2dcb696b993b8a8cf36377c
MD5 6d32030a25276a0481f68a578d6bb4fd
BLAKE2b-256 2dd3f006ef6be5de8fed3663209323498d61a75290546915f76b5e9c7ea43fb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlowess-3.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bac8820cd8c3e29db35fd8d2cc4b763c358b52fec1fe36de91b9368f81b9ce17
MD5 bac2e0cd9ef865a33e33008b114bfeb5
BLAKE2b-256 58a1bc30c9dfe3dc6cca26e21503076f95ae8ca3887420103f226cae656fafbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlowess-3.2.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ccdff1b6f158b6df6b4c09218a6c78e134a3ce22dca6de46c20a56039c90a08
MD5 0cabe3de10f9674773a37a1faea2956c
BLAKE2b-256 ebf09365ecdd9166808f71c492f9cab1f65834738fa86127bb65855d99685f68

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlowess-3.2.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6e99b0d42f04875848adc678ac470a198015638d5edc5db87fcb35d2967479a4
MD5 7bfc52d0de07ed1d9298a9ca4a525036
BLAKE2b-256 d7a776705931a6da4c670e5f0e9e61b4d76f5e2b7012fa7f1ddfc3ab83dd72e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.1-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release-pypi.yml on thisisamirv/lowess-project

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

4.0.0

7 files

This release

3.2.1 This release

7 files

3.2.0

6 files

3.1.0

6 files

3.0.0

6 files

2.0.0

6 files

1.3.0

6 files

1.2.0

6 files

1.0.0

6 files

0.99.10

6 files

0.99.9

6 files

0.99.8

6 files

0.99.7

6 files

0.99.6

6 files

0.99.5

6 files

0.99.4

35 files

0.4.0

36 files

0.3.1

36 files

0.3.0

36 files

0.2.0

36 files

0.1.1

36 files

0.1.0

27 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page