Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computing X_i in the foward-backward function #1

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment
Open

Computing X_i in the foward-backward function #1

GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
Looking at the code, I think there is a problem with one of the equations.


What is the expected output? What do you see instead?

As per Equation 37 in Rabiner's paper*, I think the Xi_t denominator/numerator  
should be calculated with the (t)'th element from the alpha table, whereas in 
the code, the (t+1)'th element from the alpha table is used.

In other words, I believe this is what the code should look like:

 Xi_t_denominator = self.__log_add(Xi_t_denominator, self.alpha_table[t][st_from] + self.trans_matrix[st_from][st_to] + self.emit_matrix[st_to][ot_next] + self.beta_table[t + 1][st_to])

* A Tutorial on Hidden Markov Models and Selected Applications in Speech 
Recognition, Rabiner, L.R., IEEE, 1989

What version of the product are you using? On what operating system?

Windows 7, Jan 1 2013 version of the hmm_faster.py



Original issue reported on code.google.com by [email protected] on 9 Oct 2013 at 8:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant