Skip to main content

A modern Python implementation of the AdaptiveFiltering toolbox.

Project description

pydaptivefiltering

A high-performance Python package for Adaptive Filtering. > Implementations are strictly based on the book Adaptive Filtering: Algorithms and Practical Implementation by Paulo S. R. Diniz.

🛠️ Description

This package provides a modern Python alternative to the MATLAB Adaptive Filtering Toolbox.

🚀 Project Status & Algorithms

The package currently covers the vast majority of classical and advanced linear adaptive algorithms, all validated via pytest with steady-state convergence scenarios.

Current Implementation

The project is currently on its early stages (pre-alpha). The planned order of work for every kind of algorithm is: (Algorithm(1), Examples(2), Notebooks(3)). The following is the planned and current progress for each of the algorithms:

  • [11/11] LMS based algorithms
  • [2/2] RLS based algorithms
  • [5*/5] SetMembership Algorithms
  • [4/4] Lattice-based RLS
  • [2*/2] Fast Transversal RLS
  • [1/1] QR
  • [5/5] IIR Filters
  • [0/6] Nonlinear Filters
  • [0/3] Subband Filters
  • [0/4] BlindFilters

PUAP: The SetMembership_Simp_PUAP implementation is currently under technical review and may not exhibit expected convergence in this version.

StabFastRLS: The Fast_TransversalRLS.StabFastRLS implementation is currently under technical review and may exhibit unexpected warnings in this version.


💻 Requirements

  • Python 3.10+ (Officially tested on 3.12.7)
  • NumPy and SciPy

Install Instructions

To install the package with pip:

pip install pydaptivefiltering

To install the package with conda:

conda install pydaptivefiltering

☕ Examples of uses

A good place to start is with the jupyter notebooks that can be found at the <Examples\Jupyter Notebooks> folder

import pydaptivefiltering as pdf

🧪 Technical Validation

The package uses rigorous unit testing to ensure the mathematical integrity of each structure. We currently maintain 57 automated tests covering:

  1. Numerical Stability: Floating-point operations for complex structures (Lattice/QR).
  2. Convergence Accuracy: Verification of steady-state MSE (Mean Square Error) against system noise levels.
  3. Tracking Performance: Capability of algorithms to adapt to abrupt system changes (Step response).

To run tests locally:

pytest

☕ Quick Example (Lattice RLS)

import numpy as np
from pydaptivefiltering.LatticeRLS.LRLS_pos import LatticeRLS

# Setup data
n_samples = 2000
x = np.random.randn(n_samples)
d = ... # Your desired signal

# Initialize Filter
model = LatticeRLS(filter_order=10, lambda_factor=0.99, epsilon=0.01)

# Optimization Process
res = model.optimize(x, d)

# Results
print(f"Final Estimation Error: {res['errors'][-1]}")

📝 License

This project is under the license found at LICENSE.

GitHub repo size GitHub language count GitHub forks Bitbucket open issues Bitbucket open pull requests


📖 References

  • Diniz, P. S. R. (2020). Adaptive Filtering: Algorithms and Practical Implementation. Springer.
  • MATLAB Adaptive Filtering Toolbox.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydaptivefiltering-0.7.0.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

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

pydaptivefiltering-0.7.0-py3-none-any.whl (80.1 kB view details)

Uploaded Python 3

File details

Details for the file pydaptivefiltering-0.7.0.tar.gz.

File metadata

  • Download URL: pydaptivefiltering-0.7.0.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for pydaptivefiltering-0.7.0.tar.gz
Algorithm Hash digest
SHA256 2c08ea77f4be20d62ad59db4ae5449ca1aafc9ba242c55b9a855129836f0bbed
MD5 5ebea2672555b2d284815194f685b965
BLAKE2b-256 e43e759b7ba6e0fe8d99ee7ae0acb7917b2e0cf1b0c2d1237aeb2ab5be346ddc

See more details on using hashes here.

File details

Details for the file pydaptivefiltering-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pydaptivefiltering-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acf5684f048ad6e3fb599424ea545858bbe2bf8001a191eaf86104ed498693e8
MD5 18d6a167fd3fd85c6b8ab90f7b6bbb95
BLAKE2b-256 92665ee865bfa267b7cc89de12b616b38c55a910bb5a8f8af7ae4712feebc366

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page