-
Notifications
You must be signed in to change notification settings - Fork 13
add unit tests for Kalman filter library #41
Comments
I would like to work on this one if its okay. Sorry for the late response, I had exams scheduled during this time |
Sure
On Sun, May 1, 2022 at 7:26 AM Maheswaran Parameswaran < ***@***.***> wrote:
I would like to work on this one if its okay :)
—
Reply to this email directly, view it on GitHub
<#41 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDK6EGE62VXTK3P6WGFYADVH2IBRANCNFSM5UDW3H6A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Sent from Gmail Mobile
|
Hi @maheswarantp, should I assign this issue to you? |
Sure, I am working on this |
@maheswarantp, can you also create a script for this? We want to add automatic unit-tests for future releases of JSL. |
Unit tests should be scripts which have statements like You define the model twice, once using TFP notation, and once using JAX. This introduces the possibility of inconsistency. Most importantly, from your plot it looks like JSL and TFP ave slighlty different posteriors for time step 1, |
Okay, I will work on that, thanks :) |
Building on @gileshd kalman_filter_test.py, I have added a few more unit tests which could be useful. They are
I have also extended the unit tests to include the kalman smoother code, testing the posterior sampling of JSL and TFP here Also @murphyk , regarding the unit tests for log marginal likelihoods asked, do you mean the conditional likelihood computed in kalman smoother code or something different? |
@maheswarantp Please make a proper PR. Also please use pytest framework. |
@maheswarantp no need for playing around with paths with: You can just use absolute imports as is done in #54 (and discussed in issue #53). |
@maheswarantp re In fact this test should probably fail because the current implementation of
Therefore the random numbers in I think in general this particular test probably isn't necessary or suitable for as part of a suite of automated tests. |
Verify that the JSL kalman filter / smoother code returns the same marginal means, covariances and log marginal likelihood as when using tfd.LinearGaussianModel,
similar to the 1d test used in kalman_sampler_demo.ipynb.
The text was updated successfully, but these errors were encountered: