Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find the most probable path (i.e. sequence of states) on an HMM using the Viterbi algorithm. However, I don't know the transition and emission matrices, which I need to estimate from the observations (data).

To estimate these matrices, which algorithm should I use: the Baum-Welch algorithm or the Viterbi Training algorithm? Why?

In case I should use the Viterbi training algorithm, can anyone provide me a good pseudocode (it's not easy to find)?

share|improve this question
You have probably read through this, but just in case you haven't, this is the one of the top review articles on HMMs… – bdeonovic Nov 14 '13 at 23:46

The transition matrix is obtained by using Markov chains. The emission matrix depends upon the hidden states that are unobservable. Each of the observed states may have more than one unobservable For example a person may be healthy or feverish depends upon observable states like cold, dizzy and headache. The matrix giving the transition probability of unobservable state to observable state is emission matrix.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.