UTF8gbsn
backward probability: HMM
λ
=
(
A
,
B
,
π
)
\lambda=(A,B,\pi)
λ=(A,B,π) is known. We define
the backward probability at time
t
t
t and its state
q
i
q_i
qi as the
probability of sequence
(
o
t
+
1
,
o
t
+
2
,
⋯
,
o
T
)
\left( o_{t+1}, o_{t+2}, \cdots, o_T \right)
(ot+1,ot+2,⋯,oT).
β t ( i ) = P ( o t + 1 o t + 2 ⋯ o T ∣ i t = q i , λ ) \beta_t(i)=P(o_{t+1}o_{t+2}\cdots o_T|i_t=q_i,\lambda) βt(i)=P(ot+1ot+2⋯oT∣it=qi,λ)
The algorithm to calculate
P
(
O
∣
λ
)
P(O|\lambda)
P(O∣λ) is shown below,
Alg:
-
Input: λ = ( A , B , π ) , O = ( o 1 , o 2 , ⋯ , o T ) \lambda=(A,B,\pi), O=\left( o_1, o_2, \cdots, o_T \right) λ=(A,B,π),O=(o1,o2,⋯,oT).
-
Output: P ( O ∣ λ ) P(O|\lambda) P(O∣λ)
-
β T ( i ) = P ( A n y ∣ i T = q i , λ ) = 1 , i = 1 , 2 , ⋯ , N \beta_T(i)=P(Any|i_T=q_i,\lambda)=1, i=1,2,\cdots,N βT(i)=P(Any∣iT=qi,λ)=1,i=1,2,⋯,N
-
for t = T − 1 , T − 2 , ⋯ , 1 t=T-1,T-2,\cdots, 1 t=T−1,T−2,⋯,1
β t ( i ) = ∑ j = 1 N a i j b j ( o t + 1 ) β t + 1 ( j ) , i = 1 , 2 , ⋯ , N \beta_t(i)=\sum_{j=1}^{N}a_{ij}b_{j}(o_{t+1})\beta_{t+1}(j),i=1,2,\cdots,N βt(i)=j=1∑Naijbj(ot+1)βt+1(j),i=1,2,⋯,N -
P ( O ∣ λ ) = ∑ i = 1 N π i b i ( o 1 ) β 1 ( i ) P(O|\lambda)=\sum_{i=1}^{N}\pi_ib_i(o_1)\beta_1(i) P(O∣λ)=i=1∑Nπibi(o1)β1(i)
Currently, we have studied forward and backward methods. The integral
form of
P
(
O
∣
λ
)
P(O|\lambda)
P(O∣λ) can be writen as below.
P ( O ∣ λ ) = ∑ i = 1 N ∑ j = 1 N α t ( i ) a i j b j ( o t + 1 ) β t + 1 ( j ) , t = 1 , 2 , ⋯ , T − 1. P(O|\lambda)=\sum_{i=1}^{N}\sum_{j=1}^{N}\alpha_t(i)a_{ij}b_j(o_{t+1})\beta_{t+1}(j), t=1,2,\cdots, T-1. P(O∣λ)=i=1∑Nj=1∑Nαt(i)aijbj(ot+1)βt+1(j),t=1,2,⋯,T−1.