# Hidden Markov Model

I am trying to construct a Hidden Markov Model to predict the next state to go to.

I am doing an example system, or, a test system that contains the following:

Ok so the training I have used is:

training = "HTTHTTTHHTTHTTTHHTTHTTTHHTTHTTTHHTTHTTTHHTTHTTTHHTTHTTTHHTTHTTTH"

and the test case is:

"HTHTTHTHTTHTHTHTHTTHHTHTHTTHTHTTHHT"

I assign the values to these, so like:

1, 'H', 0.5

2, 'H', 0.75

3, 'H', 0.25

1, 'T', 0.5

2, 'T', 0.25

3, 'T', 0.75

I compute the forward probability, this gives a result of: 0.25

And the viberti algorithm is used to find the best path:

 2 , 3 , 3 , 2 , 3 , 3 , 3 , 2 , 2 , 3 , 3 , 2 , 3 , 3 , 3 , 2 , 2 , 3 , 3 , 2
, 3 , 3 , 3 , 2 , 2 , 3 , 3 , 2 , 3 , 3 , 3 , 2 , 2 , 3 , 3 , 2 , 3 , 3 , 3 ,
2 , 2 , 3 , 3 , 2 , 3 , 3 , 3 , 2 , 2 , 3 , 3 , 2 , 3 , 3 , 3 , 2 , 2 , 3 , 3
, 2 , 3 , 3 , 3 , 2


The confusion is how to do I determine which is the next sequence from the Viberti Algorithm? It gives values of (2, 3) BUT, I do not know whether these are H, or T.

Anyone offer any help?

• ...but hmm is :) Commented Nov 28, 2012 at 23:28
• @learnvst Hey - I updated my question, can you make any suggestions? Commented Nov 29, 2012 at 0:35