adaptif 0.0.1

Adaptive filters for digital signal processing.
Documentation
adaptif-0.0.1 has been yanked.

Adaptif

Actions status

Ruff License

Rust crate for DSP Adaptive Filters with Python bindings.


Project is still WIP. Going through massive refactor to Rust pyo3 internals


Filters:

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

Installation

The projects currently supports Rust stable and Python 3.11 - 3.15.

Cloning the repo:

git clone https://github.com/bglid/adaptif.git

Then 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 above

All development processes (running checks, test, etc.) are codified in the project's Makefile. See CONTRIBUTING.md for a quick reference on the available commands.

Contributing

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.

Usage

Rust

See the examples in examples/.

Python

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:

  • d is the desired/noisy signal.
  • x is the reference noise signal.

Citation

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