Closed ahwillia closed 2 years ago
This looks great so far! Happy to pair program tomorrow morning if you're available.
It could be tough to get TFP to play nicely since expected_transitions
is here a tuple of unknown length. TFP Distributions want to know the number of parameters in advance so they can slice and broadcast appropriately. That said, this approach is really clever, so I'm partial toward making it work even if it means FactorialHMMPosterior can't be a Distribution.
I think you can sum the expected transitions more easily by doing tree_map(partial(np.sum, axis=0), expected_transitions)
1 files 1 suites 2m 10s :stopwatch: 26 tests 26 :heavy_check_mark: 0 :zzz: 0 :x:
Results for commit 1bae4404.
:recycle: This comment has been updated with latest results.
Here is a prototype for a factorial HMM. @slinderman -- I probably need your help specifying the posterior distribution in a way that tensorflow probability will accept...
Note -- I think the the m-step of factorial transitions will be greatly simplified if we could pass
expected_transitions
to the m-step function instead of(dataset, posteriors)
.