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-4.0.0.tar.gz (654.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-4.0.0-cp38-abi3-win_arm64.whl (332.5 kB view details)

Uploaded CPython 3.8+Windows ARM64

fastlowess-4.0.0-cp38-abi3-win_amd64.whl (355.6 kB view details)

Uploaded CPython 3.8+Windows x86-64

fastlowess-4.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (476.7 kB view details)

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

fastlowess-4.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (460.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fastlowess-4.0.0-cp38-abi3-macosx_11_0_arm64.whl (428.4 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fastlowess-4.0.0-cp38-abi3-macosx_10_12_x86_64.whl (443.9 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for fastlowess-4.0.0.tar.gz
Algorithm Hash digest
SHA256 821848648fb741888435c140e808b0fe3f100f6ee9192ef892bfdacad92b0d44
MD5 026ef5f6cde4ee4c806dcea012e6eed5
BLAKE2b-256 bd358afa2afaeb71cf3a2b93601f2882963e97f2eabcada117cf71a9b725f2e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlowess-4.0.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-4.0.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: fastlowess-4.0.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 332.5 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-4.0.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a1617944b5fefef990b4f6bf137e4e7d8d643dcdc216d58c7753dfe1e7ae9b37
MD5 3b5448e6fb32eec4d866f779fcb90c1a
BLAKE2b-256 05461e6b16ce2539e3505ec69a9c45cc62f110c6b5131b11ab039261e64d5062

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fastlowess-4.0.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 355.6 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-4.0.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2cfebd6044dad6656e8b99b03cbc2439c4daa0aa5171dda92542d132c9d3b729
MD5 3856ced76fef3c81189df87731183a2d
BLAKE2b-256 0bd6a7977e34e5b1cf646055d2877f14610c703f5bca30ca366090ca95cf8f31

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fastlowess-4.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 726e5536d7177b03483e07077bcbf0e706dba0338516f249a73decfe299d8cfa
MD5 5c4a414dc0a009352e5341b73acc1ddb
BLAKE2b-256 51f600a9e1a76e65698617eab086e2e227fd8c0a93d48269b7d02ed37bc3754c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fastlowess-4.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 68422479bc1be102cb36edc10ab7e638bcca71730cfb02cc8e630e302800c726
MD5 db19612777a6335d65496250c5244d62
BLAKE2b-256 30315dbf2a12fbc33b749b063fd18745854965b2fae705af08471cf4fd0a681c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fastlowess-4.0.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39458d50c7960d82207f0a77563a7b7c350380bb4a31334c6f3027e6bf3bcff6
MD5 8ec8bb479eb1c00c47f0c09eeea75cb7
BLAKE2b-256 369af405958fd4390e843e4c5b455af08ef1d98c3cc7b5c1d029f1477f429a4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fastlowess-4.0.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 71fa88a8f6ec3b9eb44b26682ccbbfa69a2520350b487598ed24fe5b701d0e57
MD5 51f438d36e12e78e39a4aa9538fbaeec
BLAKE2b-256 af10b4a48b4c92b24081bf0cd6520217d717ca19effb986c488e197d2089d845

See more details on using hashes here.

Provenance

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

This release

4.0.0 This release

7 files

3.2.1

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