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.0.tar.gz (641.6 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.0-cp38-abi3-win_amd64.whl (352.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

fastlowess-3.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (473.7 kB view details)

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

fastlowess-3.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (458.4 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fastlowess-3.2.0-cp38-abi3-macosx_11_0_arm64.whl (426.6 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fastlowess-3.2.0-cp38-abi3-macosx_10_12_x86_64.whl (441.4 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fastlowess-3.2.0.tar.gz
  • Upload date:
  • Size: 641.6 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.0.tar.gz
Algorithm Hash digest
SHA256 90d02f38a0cc802ac3de6b4355f51423601c724e923f80dab8e2d856de6e18f2
MD5 51be5c4636999992bd8a8b2751a2bb6e
BLAKE2b-256 09bc51201d7e9667865282425b89b7b0d4651c1a4859dbea009d1622c34959e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.0.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.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: fastlowess-3.2.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 352.8 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.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5cc1ac8ec76e70d9a409fdddc0006d44b0ac00d28aaf50eaf6790355c1000174
MD5 316f9b64752c3d69edf97d45e3682998
BLAKE2b-256 8cb701b50e96c6e1c440ca43c7950e9c00dcac6fd068bcbc468d3d75c2a5e631

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.0-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.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 394c8a494883ce516138bb95e02f8f34f14294b5ffcee897aa5eb3d5eb870f85
MD5 f620ac5b5c7baa19255454a913d95c5e
BLAKE2b-256 29463370fcf7ad047e02f71f885dfc1d0c6b5ac4feb9222d012edb6e120a305c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.0-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.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 079ed66ff101d96850048bb95d6ff3c0b672495568df40e86e502c5ac3ae63b1
MD5 fc4734ba4d0e4435e52c6bd9573790c9
BLAKE2b-256 fb17faf9276a17482925d9356633af0c557ab86cfcd6aa3575c534d307ceb546

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.0-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.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef5a5e62053c7a8d5740687367a18d3d854bae954594f1289ea6b09af9252c4b
MD5 a1730fb6378add583b09c09a3ddda341
BLAKE2b-256 3abb87621dec085e7171aab69bf854fc942034b87e64d8273a4024a1e4717cb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.0-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.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastlowess-3.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4b9bff06541005e3f190511fa8400ab6b5ecba31864fb1dd9a5d73b3cf8ac9cf
MD5 9f26b36f1ce865bcc62ddcfc0466b3d1
BLAKE2b-256 7a0613bb45f1516a69bab57ca3ed64c4262051cc18185f69819e16cd0d98394d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-3.2.0-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

3.2.1

7 files

This release

3.2.0 This release

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