Forward–backward algorithm: Difference between revisions

Content deleted Content added
Line 301:
<source lang="python">
states = ('Healthy', 'Fever')
end_state = 'E'
observations = ('normal', 'cold', 'dizzy')
Line 316 ⟶ 315:
for l, x_i in enumerate(x):
fwd = []
for st in states:
f_prev = {}
f_curr = {}
for st in states:
if i == 0:
prev_f_sum = a_0[st]
f_prev = f_curr