Skip to main content

kalbee 🐝

kalbee logo

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

🧪 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.

Download files

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

Source Distribution

kalbee-0.3.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

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

kalbee-0.3.0-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file kalbee-0.3.0.tar.gz.

File metadata

  • Download URL: kalbee-0.3.0.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for kalbee-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c07b412d353e170946f133e88d146e342ce8730662d21021d6bfc10cd5dcb889
MD5 782b4b7c9934419a6dcb9cfd23c9bbfd
BLAKE2b-256 fc14e507c062e341b60b154c1c1c8ed50d7babbf92f66e6705fbadd0f8c9a112

See more details on using hashes here.

File details

Details for the file kalbee-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: kalbee-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for kalbee-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bee089fc1da74c70d0138917583360c2a661900d519fedffe0f3a75cb301eecb
MD5 3c2f8acea356bdbd7fc8f405cd6da3c3
BLAKE2b-256 7011cf30b9c302c773e72cdf632db8c3ce5a580000ddd787eae2ed4384864f59

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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