Closed kostastsa closed 8 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Hi @murphyk @slinderman , I was wondering if one would kindly take a look at this PR implementing the RBPF. Would you let me know if there is something that needs to be changed? I understand that implementing a SLDS model class goes beyond what was raised in issue https://github.com/probml/dynamax/issues/271 and might not be necessary, in which case I'd be happy to fix this and make a more minimal implementation.
For the resampling step, maybe it would be worth making a jax version of https://github.com/nchopin/particles/blob/master/particles/resampling.py#L541?
LGTM. We can modify resampling code later (if necessary).
Thanks, @kostastsa. One of the big items on my wishlist is to have a solid implementation of SLDS model variants and inference algorithms in dynamax. This is a great start.
@murphyk Cool, I will check the multinomial resampling from Chopin and do a jax version. @slinderman That's great to hear! I would be super interested in being part of this effort. I can start working on this soon, since I will also need it for my own research.
SLDS
based onSSM
. I have put everything in a folderdynamax/slds
.inference.py
file. Other inference methods for SLDS, (such as generalized pseudo Bayes etc) can be included in the same file.inference_test.py
which compares the new implementation to an older one referenced in #271 which has been included indynamax/slds/mixture_kalman_filter.py
. Since the algorithm is stochastic and there is no exact baseline I wasn't sure how to test it, so I ended up doing anallclose
with a large tolerance between the two implementations.