A clean, modular Python implementation of Kalman Filters and estimation algorithms.
Project description
kalbee 🐝
kalbee is a clean, modular Python implementation of Kalman Filters and related estimation algorithms. Designed for simplicity and performance, it provides a standard interface for state estimation in various applications.
✨ Features
- 8 Filters: KF, EKF, UKF, Particle, Ensemble, Information, Alpha-Beta-Gamma, Adaptive KF
- RTS Smoother: Rauch-Tung-Striebel backward smoother for post-processing
- Metrics: RMSE, NEES, NIS, Log-Likelihood for filter diagnostics
- Experiment Runner: Compare filters on synthetic signals with one line
- AutoFilter Factory: Switch between filters by name
- Numerical Stability: Joseph form covariance updates, symmetry enforcement
- NumPy/SciPy Integration: Optimized for numerical computations
🚀 Installation
pip install kalbee
Or from source:
git clone https://github.com/MinLee0210/kalbee.git
cd kalbee
pip install -e .
🛠️ Quick Start
1. Standard Kalman Filter
import numpy as np
from kalbee import KalmanFilter
state = np.zeros((2, 1)) # [position, velocity]
cov = np.eye(2)
F = np.array([[1, 1], [0, 1]]) # Constant velocity model
Q = np.eye(2) * 0.01
H = np.array([[1, 0]])
R = np.array([[0.1]])
kf = KalmanFilter(state, cov, F, Q, H, R)
kf.predict()
kf.update(np.array([[1.2]]))
print(f"Estimated State:\n{kf.x}")
2. Compare Filters with Experiments
from kalbee import run_experiment
report = run_experiment(
signal="sine",
filters=["kf", "ekf", "ukf", "pf"],
noise_std=0.5,
)
print(report.summary())
3. AutoFilter Factory
from kalbee import AutoFilter
kf = AutoFilter.from_filter(state, cov, F, Q, H, R, mode="kf")
# Available modes: kf, ekf, ukf, abg, pf, enkf, if, akf
📚 Documentation
Full documentation with theory, code examples, and experiments for each filter:
pip install mkdocs-material
mkdocs serve
- Getting Started
- Filters: KF · EKF · UKF · PF · EnKF · IF · ABG · AKF
- Features: RTS Smoother · Metrics · Experiments
- Architecture
🧪 Testing
uv run pytest tests/ # 58 tests
📄 License
This project is licensed under the Apache License 2.0.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Check TODO.md for ideas.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kalbee-0.2.0.tar.gz.
File metadata
- Download URL: kalbee-0.2.0.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
338f81d6349e87b73cd0393f9a2d4171315738d47b0d3f5fbc13bf3e177b1702
|
|
| MD5 |
52dc70f808696b1b163cd0c312617d35
|
|
| BLAKE2b-256 |
a3c809c2168abace57d7130ece4924ce96b96a7d38ab21f8d89d8211ec133594
|
File details
Details for the file kalbee-0.2.0-py3-none-any.whl.
File metadata
- Download URL: kalbee-0.2.0-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da26470f6eb5703bc030a12521c406338ea74e4a7e07851c706db3efad4adb77
|
|
| MD5 |
61dc916afaef66be330f3bc2b047bf41
|
|
| BLAKE2b-256 |
b9435540e64a34b008f4eed3606b18ad0e20dacf73d20d72f7edc06006bdba6b
|