probml / JSL

Jax SSM Library
MIT License
50 stars 13 forks source link

kalman sampler and demo #37

Closed xinglong-li closed 2 years ago

xinglong-li commented 2 years ago

Add the kalman smoothing sampler algorithm and a demo(including a com…

murphyk commented 2 years ago

Hi @xinglong-li . I moved your demo to https://github.com/probml/JSL/blob/main/jsl/demos/kalman_sampling_demo.ipynb. However there seems to be a small discrepancy with TFP posterior sampler on the first time step. I think this might be an off-by-one indexing error. PTAL.

Also please refactor your code to eliminate unnecessary matrix transpose. For example, use et = state - A @ mutt instead of et = state - mutt @ A.T, to more closely match the math convention of matrix x column vector.