Bug in HMM Prediction() ? #303

Closed
rcurtin opened this Issue Dec 29, 2014 · 2 comments

Projects

None yet

1 participant

@rcurtin
Member
rcurtin commented Dec 29, 2014

Reported by mistycheney on 10 Jan 44039715 23:18 UTC
Viterbi algorithm uses backtracking to find the most probable state sequence, but nowhere in the implementation of HMM::Prediction() can I find the backtracking stage. The array StateSeq is set only in the forward pass. This is obviously not correct because stateSeq[0] is determined without even seeing the later observations.

@rcurtin rcurtin self-assigned this Dec 29, 2014
@rcurtin rcurtin added this to the mlpack 1.0.9 milestone Dec 29, 2014
@rcurtin rcurtin closed this Dec 29, 2014
@rcurtin
Member
rcurtin commented Dec 30, 2014

Commented by rcurtin on 17 Jan 44040372 13:15 UTC
You are right; hmm_impl.hpp at line 387/388 calculates P(s_j) not P(s_j | k). This probably means HMM::Predict() will need to be rewritten, and the tests may also need to be rewritten (or tolerances adjusted).

@rcurtin
Member
rcurtin commented Dec 30, 2014

Commented by rcurtin on 12 Jun 44114068 16:25 UTC
This was fixed by Michael Fox in r16245. If you update to the latest svn trunk, it should be fixed. Feel free to reopen the bug if you think there is still a problem.

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