Learn Before
Formula

Viterbi Algorithm Probability Recursion Formula

The Viterbi algorithm first sets up a probability matrix, with one column for each observation oto_t and one row for each state in the state graph. Each column thus has a cell for each state qiq_i in the single combined automaton. Each cell of the matrix is given by:

v_t(j) = max_{q_1, ..., q_{t-1}} P(q_1...q_{t-1}, o_1, ..., o_t, q_t = j|lambda)

For a given state qjq_j at time tt, we compute the value vt(j)v_t(j) as:

vt(j)=maxi=1Nvt1(i)aijbj(ot)v_t(j) = \max_{i=1}^N v_{t-1}(i)a_{ij}b_j(o_t)

where:

  • vt1(i)v_{t-1}(i) is the previous Viterbi path probability from the previous time step
  • aija_{ij} is the transition probability from previous state qiq_i to current state qjq_j
  • bj(ot)b_j(o_t) is the state observation likelihood of the observation symbol oto_t given the current state jj

0

0

Updated 2026-06-18

Tags

Data Science