Skip to main content

LOESS Project

PyPI fastloess (Python) CI

One LOESS to Rule Them All
One LOESS to Rule Them All

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

The loess-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


LOESS vs. LOWESS

Feature LOESS (This Crate) LOWESS
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 LOESS works in the Concepts.

Note: For a LOWESS implementation, use lowess-project.


Why this package?

Speed

The loess project beats the competition in terms of speed, whether in single-threaded or multi-threaded parallel execution. It is typically 5–20x faster than R's loess in serial mode, and up to 200x faster on large datasets with parallel execution.

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

Robustness

This implementation is more robust than R's loess 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, R's loess 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

R's loess does 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 R (stats)
Polynomial Degree 5 (0–4) 2 (1 or 2)
Kernel 7 options only Tricube
Robustness Weighting 3 options only Bisquare
Scale Estimation 3 options only MAR
Distance Metric 6 options normalized only
Boundary Padding 4 options no padding
Zero Weight Fallback 3 options no
Auto Convergence yes no
Online Mode yes no
Streaming Mode yes no
Confidence Intervals yes no
Prediction Intervals yes no
Diagnostics (RMSE, R2, AIC) yes no
Cross-Validation 2 options no
Parallel Execution yes no
no-std Support yes no

Validation

All implementations are numerical twins of R's loess:

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{loess_project,
  author = {Valizadeh, Amir},
  title = {LOESS Project: High-Performance Locally Estimated Scatterplot Smoothing},
  year = {2026},
  url = {https://github.com/thisisamirv/loess-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

fastloess-2.0.0.tar.gz (985.7 kB view details)

Uploaded Source

Built Distributions

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

fastloess-2.0.0-cp38-abi3-win_arm64.whl (422.4 kB view details)

Uploaded CPython 3.8+Windows ARM64

fastloess-2.0.0-cp38-abi3-win_amd64.whl (456.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (575.6 kB view details)

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

fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (553.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl (516.4 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl (538.4 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file fastloess-2.0.0.tar.gz.

File metadata

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

File hashes

Hashes for fastloess-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9e6eedf835475aa54997f6582774b7a1a0ef0edb9a238916ff40407c8f5e7304
MD5 2d861e79f7100543883011ff7dfbc3c8
BLAKE2b-256 4c2050c2f9242005e33ec46eebf5308044fbed005d73a03b2e45ef3db54c5bab

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0.tar.gz:

Publisher: release-pypi.yml on thisisamirv/loess-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 fastloess-2.0.0-cp38-abi3-win_arm64.whl.

File metadata

  • Download URL: fastloess-2.0.0-cp38-abi3-win_arm64.whl
  • Upload date:
  • Size: 422.4 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 fastloess-2.0.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c036152a34e781d8b28cd35fbb1eada7cf7b4649e5c92c1928649ff1b420a243
MD5 e7e3f6de2f920bbc8c0d2b9f7c65301b
BLAKE2b-256 4c7ae36fb42b1aecbfd591357eeeaf623228edf85e70f0b0f5b409109e0e2a75

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0-cp38-abi3-win_arm64.whl:

Publisher: release-pypi.yml on thisisamirv/loess-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 fastloess-2.0.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: fastloess-2.0.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 456.9 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 fastloess-2.0.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2aea12adc8a0c6b38490788386ebf51152658cd32c307c47408020acfa271833
MD5 1ab9c370879511101772544483f03198
BLAKE2b-256 c4410f6e1c38d236c1fc29428018da926b8c567204325553a2d884f0ef889b47

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0-cp38-abi3-win_amd64.whl:

Publisher: release-pypi.yml on thisisamirv/loess-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 fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4af68f15fe5c7884fdc66318a429eb382edecd0b453fb2d5695eab3a40ee5895
MD5 89888abc7e0ddf5ba93260b945a1e288
BLAKE2b-256 e78a9149d0f4512e76295dcaf893488390f900ce82488f4fb2f6425ff63b2e38

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-pypi.yml on thisisamirv/loess-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 fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 87f809f5eda5d0358b3a991293a15b8615b9601c94e1c59bb871127a61d79446
MD5 015be991cbb0a626bcaf1c92995a6674
BLAKE2b-256 a4d62e3ea7834c75ed4719ea7799cb01b358ccec39b48220bfbf3191517b822c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-pypi.yml on thisisamirv/loess-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 fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7588ebeb597150e0200f57c6b3915e5b2e74c7342ed7794bf821539fd4c25d16
MD5 703c85eebc001879520f896e53fa1e1a
BLAKE2b-256 8efd18a3c7d33102b81232e2316dd5d05267e0fa5664c3adaf5d390ac44a0d24

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on thisisamirv/loess-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 fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c98de999aff477061fea35d166496483ab0486c69b7d820bc777b59e3d06fc70
MD5 51135dc88bfd4b7ba5237dfad95683d3
BLAKE2b-256 57d857b102b6407157ea418e156b7161573777208ba8ebd00c444472660e0f06

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release-pypi.yml on thisisamirv/loess-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

2.0.0 This release

7 files

1.1.0

6 files

1.0.0

6 files

0.9.0

6 files

0.1.0

36 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