HMM optimization mentioned in the documentation

14 views
Skip to first unread message

Olcan Sercinoglu

unread,
Dec 1, 2020, 6:39:50 PM12/1/20
to webppl-dev
Hi all,

I've been trying to understand the "one more optimization" mentioned at http://dippl.org/chapters/04-factorseq.html as "(There is one more optimization for the HMM: We could achieve dynamic programming by inserting additional marginal operators at the boundary of hmmRecur and caching them.)".

I played around with wrapping the recursive call to hmmRecur inside Infer() and returning sample or sampleWithFactor() but none of it felt right and indeed the results were different (and incorrect assuming the original example is correct). Could anyone help clarify what is the right way to implement this optimization? Thanks in advance!

Best,
--Olcan
Reply all
Reply to author
Forward
0 new messages