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}
}

Release files for fastloess 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastloess 2.0.0
File Size Uploaded
fastloess-2.0.0.tar.gz 985.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for fastloess 2.0.0
File
fastloess-2.0.0-cp38-abi3-win_arm64.whl CPython 3.8 abi3 Windows ARM64 Details
fastloess-2.0.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 4.0 MB

Release files / fastloess-2.0.0.tar.gz

Download URL fastloess-2.0.0.tar.gz
Size 985.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9e6eedf835475aa54997f6582774b7a1a0ef0edb9a238916ff40407c8f5e7304
BLAKE2b-256 checksum
How to use checksums
4c2050c2f9242005e33ec46eebf5308044fbed005d73a03b2e45ef3db54c5bab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / fastloess-2.0.0-cp38-abi3-win_arm64.whl

Download URL fastloess-2.0.0-cp38-abi3-win_arm64.whl
Size 422.4 kB
Tags CPython 3.8 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
c036152a34e781d8b28cd35fbb1eada7cf7b4649e5c92c1928649ff1b420a243
BLAKE2b-256 checksum
How to use checksums
4c7ae36fb42b1aecbfd591357eeeaf623228edf85e70f0b0f5b409109e0e2a75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / fastloess-2.0.0-cp38-abi3-win_amd64.whl

Download URL fastloess-2.0.0-cp38-abi3-win_amd64.whl
Size 456.9 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2aea12adc8a0c6b38490788386ebf51152658cd32c307c47408020acfa271833
BLAKE2b-256 checksum
How to use checksums
c4410f6e1c38d236c1fc29428018da926b8c567204325553a2d884f0ef889b47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fastloess-2.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 575.6 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4af68f15fe5c7884fdc66318a429eb382edecd0b453fb2d5695eab3a40ee5895
BLAKE2b-256 checksum
How to use checksums
e78a9149d0f4512e76295dcaf893488390f900ce82488f4fb2f6425ff63b2e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fastloess-2.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 553.3 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
87f809f5eda5d0358b3a991293a15b8615b9601c94e1c59bb871127a61d79446
BLAKE2b-256 checksum
How to use checksums
a4d62e3ea7834c75ed4719ea7799cb01b358ccec39b48220bfbf3191517b822c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL fastloess-2.0.0-cp38-abi3-macosx_11_0_arm64.whl
Size 516.4 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7588ebeb597150e0200f57c6b3915e5b2e74c7342ed7794bf821539fd4c25d16
BLAKE2b-256 checksum
How to use checksums
8efd18a3c7d33102b81232e2316dd5d05267e0fa5664c3adaf5d390ac44a0d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl

Download URL fastloess-2.0.0-cp38-abi3-macosx_10_12_x86_64.whl
Size 538.4 kB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c98de999aff477061fea35d166496483ab0486c69b7d820bc777b59e3d06fc70
BLAKE2b-256 checksum
How to use checksums
57d857b102b6407157ea418e156b7161573777208ba8ebd00c444472660e0f06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

7 release files

1.1.0

6 release files

1.0.0

6 release files

0.9.0

6 release 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