probml/dynamax

expand KF filtering test to compare to explicit MVN

murphyk opened this issue · 1 comments

In our hmm inference test code, we build an explicit representation of the multi-dimensional joint distribution, and use it to check inference results. We should do the same for LG-SSMs, where the joint is a large MVN (see sec 2.2.6.1 of https://probml.github.io/pml-book/book2.html). Add this to the current LGSSM inference test code, that compares results to TFP.

Hi, I have created a branch in which I have started to address this issue. I have added a function at the top of dynamax/linear_gaussian_ssm/inference_test.py implementing the joint posterior $p(x_{1:T}|y_{1:T})$ as a large MVN. I am comparing the block-marginals of this joint MVN to the smoothing distributions from dynamax inside the test_kalman() function. I was curious if you also wanted to compare to the filtering distributions and marginal likelihood. I would appreciate any comments/suggestions that would improve the implementation. Looking forward to hearing your feedback!