Feature Request: HMM Inference
GoogleCodeExporter opened this issue · comments
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
I would like to see the exposure of the backward and forward algorithms to the
CLI for HMM inference, including determine the backward, forward and posterior
probabilities of states given sequence symbol, as the
backward/forward/posterior function in the R's HMM package (see link below).
What version of the product are you using? On what operating system?
0.6.1; Windows 7
Please provide any additional information below.
http://cran.r-project.org/web/packages/HMM/HMM.pdf
Original issue reported on code.google.com by changzho...@gmail.com
on 18 Jul 2011 at 6:06
Indeed, given the input HMM model with N+1 states S_0,...N, and an input
observation sequence of M+1 symbols O_0,...,O_m:
The probability for the state at time t, q[t], to be equal to S_i can be
ForwardProbability(q[t]==S_i|O_0,...,O_t) = alpha[t][i]/(sum_{j=0..N}
alpha[t][j])
BackwardProbability(q[t]=S_i|O_{t+1},...,O_m) = beta[t][i]/(sum_{j=0..N}
beta[t][j])
PosteriorProbability(q[t]=S_i|O_0,...,O_m) =
alpha[t][i]*beta[t][i]/(sum_{j=0..N} alpha[t][j]*beta[t][j])
This can be easily implemented in the HMM class.
Original comment by changzho...@gmail.com
on 19 Jul 2011 at 3:51