KalmanFormer - using transformer to model the Kalman Gain in Kalman Filters
Project description
KalmanFormer
Implementation of KalmanFormer.
The paper proposes learning the Kalman Gain directly from data using Transformers, bypassing the limitations of traditional Kalman Filters on non-linear systems.
Install
$ pip install kalmanformer
Usage
import torch
from kalmanformer import KalmanFormer
# kalmanformer
kalmanformer = KalmanFormer(
state_dim = 3,
obs_dim = 3,
dim = 64,
depth = 2,
heads = 2,
dim_head = 32,
mlp_dim = 64
)
# mock observations
observations = torch.randn(2, 10, 3)
# state transition matrix f and observation matrix h
F = torch.randn(3, 3)
H = torch.randn(3, 3)
# initial state
x_0 = torch.zeros(2, 3)
# tracking over sequence
post_states = kalmanformer(
observations,
F,
H,
x_0 = x_0
)
assert post_states.shape == (2, 10, 3)
Citations
@article{Shen2025KalmanFormer,
title = {KalmanFormer: using transformer to model the Kalman Gain in Kalman Filters},
author = {Siyuan Shen and Jichen Chen and Guanfeng Yu and Zhengjun Zhai and Pujie Han},
journal = {Frontiers in Neurorobotics},
year = {2025},
volume = {18},
doi = {10.3389/fnbot.2024.1460255}
}
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
kalmanformer-0.0.2.tar.gz
(5.8 kB
view details)
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 kalmanformer-0.0.2.tar.gz.
File metadata
- Download URL: kalmanformer-0.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03867d5ee1cf5d761ec25f08d6bcb9aa271625bb755e0c268f295e46e92c023d
|
|
| MD5 |
b0dff0a9934aec4fbc17e543cc601042
|
|
| BLAKE2b-256 |
47440645fabd60c6d5ed6d7f40f3a9433fa8a8c676951719248764833cf35a43
|
File details
Details for the file kalmanformer-0.0.2-py3-none-any.whl.
File metadata
- Download URL: kalmanformer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d01404c259947a88f636744f5bc5c58b197076ce55ac1e41f126423edfc9d79b
|
|
| MD5 |
5aed784de933793d2d88a223c35c0690
|
|
| BLAKE2b-256 |
03373225f9d66a60075ce0a8f5d21ca98598eaa09e0e581275f53aa719c868e0
|