Project is still WIP. Going through massive refactor to Rust pyo3 internals
This project contains Rust implementations of Adaptive filtering algorithms, with bindings for Python. We're currently working towards a first full release, which will include the following algorithms:
| Adaptive Filter Algorithm | Status |
|---|---|
| Least Mean Squares (LMS) | ✔ |
| Normalized Least Mean Squares (NLMS) | ✔ |
| Recursive Least Squares (RLS) | ✔ |
| Affine Projection Algorithm (APA) | in progress |
The projects currently supports Rust stable and Python 3.10 - 3.14.
Cloning the repo:
git clone https://github.com/bglid/adaptif.gitThen use Make to set up the dev environment:
make setup-rust # Install/update the Rust toolchain through Rustup
make setup-uv # Install and setup uv for Python dependency management
# or
make setup # Run both of the aboveAll development processes (running checks, test, etc.) are codified in the project's Makefile. See CONTRIBUTING.md for a quick reference on the available commands.
See CONTRIBUTING.md for setup and contribution guidelines.
In short,
- Open an issue for a discussion. We will likely handle it.
- Undisclosed AI PRs will be closed and no further PRs from said user will be considered.
See the examples in examples/.
Filters can be imported from the adaptif package.
LMS adaptive filter example:
from adaptif import LMSFilter
# setting up filter
lms_af = LMSFilter(mu=0.001, n=32)
# Assuming signals are already present and named accordingly
cleaned_signal = lms_af.adapt(d=noisy_signal, x=noise)Here:
dis the desired/noisy signal.xis the reference noise signal.
If you found any of this helpful, feel free to cite it, or just send us an email.
@misc{adaptif,
authors = {Benjamin Glidden, Elias Naske},
title = {Adaptif: Rust crate for DSP adaptive filters with Python bindings},
year = {2026},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/bglid/adaptif}}
}