Given a standard discrete Hidden Markov Model, I need to compute the most probable state at the current time instant, given all previous observations. This entails that I compute the following probabilities: \begin{equation} Pr.\{q(k) = S_i | O_1,O_2,\ldots,O_k, \lambda\} \end{equation} where $q(k)$ and $O_k$ denote the state and observation at time instant $k$ and $\lambda$ is the HMM. This problem can be solved using the Forward Algorithm:
- Recursively compute $\alpha_k(i) = Pr.\{q(k) = S_i, O_1,O_2,\ldots,O_k | \lambda\}$.
- Compute $\gamma_k(i) = Pr.\{q(k) = S_i | O_1,O_2,\ldots,O_k, \lambda\} = \frac{\alpha_k(i)}{\sum_{i=1}^{M}\alpha_k(i)}$, where M is the total number of states.
- The most likely state at time $k$,$\;\; q^*(k) = arg \max_{1\leq i\leq M} \gamma_k(i)$.
$\textbf{My Question:}$ The estimated state trajectory (which is not a valid trajectory in terms of the transition probabilities) seems to hover around the actual state path but never converges to it (I never get perfect estimation), and the quality/accuracy of the estimation doesn't seem to get better with time. Is this behavior expected? More importantly, how do I quantitatively measure the performance of the algorithm? Does a metric like $\sum_{j = 1}^k|q(j) - q^*(j)|$ represent a fair metric? Any links to resources/books would be appreciated. Note: I am using a log-probability based implementation to prevent the probabilities from becoming too small.