Assignment 2: Implementing Viterbi algorithm for HMM
In this assignment you have to work on HMM. For this week implement the Viterbi algorithm on the URN problem described in the class.
An HMM is defined by three probability matrices A(Transition Probabilities),B(Emission Probabilities) and pi(Initial state probabilities).
- You can take the probability values given in the slides as the trained HMM.
- Implement the viterbi algorithm which takes a sequence of colors of balls(eg.RRGGBRGR) as input and produce the best state sequence(urn sequence) as output.
- Use the tabular representation explained in the lecture to implement the algorithm.
The algorithm should be generic. Later this assignment may be extended to include training an HMM i.e to learn the probability values.