Forward–backward algorithm: Difference between revisions

Content deleted Content added
Undid revision 654797958 by 79.165.161.94 (talk)
Line 359:
b_curr[st] = sum(a[st][l]*e[l][x_i_plus]*b_prev[l] for l in states)
 
sum_prob = sum(b_curr.values())
for st in states:
b_curr[st] /= sum_prob # normalising to make sum == 1
 
bkw.insert(0,b_curr)
b_prev = b_curr