Forward–backward algorithm: Difference between revisions

Content deleted Content added
Nakane (talk | contribs)
Changed the example script to return posterior in List of Dict, not Dict of List, for consistency with fwd and bwd.
Line 360:
# merging the two parts
posterior = {}[]
for sti in statesrange(L):
posterior[.append({st]: = [fwd[i][st]*bkw[i][st]/p_fwd for ist in range(Lstates})]
assert p_fwd == p_bkw