mattjj / pylds

some tools for gaussian linear dynamical systems
MIT License
84 stars 25 forks source link

Fix info form log likelihood calculations with inputs #4

Closed slinderman closed 7 years ago

slinderman commented 8 years ago

@mattjj, I've implemented the message passing and sampling code for both info and distribution form. I also updated test_dense.py and test_infofilter.py accordingly. However, after an hour of investigating the info form log likelihood calculations, I haven't been able to get the log likelihood calculations of the info filter to match those of the standard Kalman filter. I'm hoping you can take a look and make sense of it.

The tests currently fail here: https://github.com/mattjj/pylds/blob/inputs/tests/test_infofilter.py#L238

I believe the LDSStates._extra_loglike_terms have been updated correctly, but I'm not sure.

Also, I guessed that the info_predict should be updated to use h_{t|t}+h_1, i.e. the h in the joint potential, but maybe that's incorrect. See this python implementation for clarification: https://github.com/mattjj/pylds/blob/inputs/tests/test_infofilter.py#L145

Note, test_diagonal_plus_lowrank.py and test_randomwalk.py have not been updated so they will fail as well.

slinderman commented 7 years ago

This is fixed by https://github.com/mattjj/pylds/pull/6

The new info form code accumulates log normalizers.

test_diagonal_plus_lowrank.py and test_randomwalk.py still need to be updated.