Adaptif
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:
Then use Make to set up the dev environment:
# or
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:
# setting up filter
=
# Assuming signals are already present and named accordingly
=
Here:
dis the desired/noisy signal.xis the reference noise signal.
Citation
If you found any of this helpful, feel free to cite it, or just send us an email.