# Thread: Can anyone help me with Hidden Markov question?

1. ## Can anyone help me with Hidden Markov question?

I've been working on this for few hours and no luck. I'd appreciate any help.

Based on the Viterbi algorithm, marginal probability of a sequences being generated by a given HMM model with the Forward algorithm, I'm trying to calculate both, the most probable path-Viterbi- as well as the marginal probability of observing the sequence “ILDE”, for the model defined below.

a. The model has two possible states: transmembrane state (TM) and non-transmembrane state (NT)

b. The state transition matrix A:

 St+1 TM NT St TM 0.8 0.2 NT 0.2 0.8

a. The emission matrix E:

 Amino Acids L I E D State TM 0.45 0.45 0.05 0.05 NT 0.05 0.05 0.45 0.45

Assume that transition from start state to TM or NT has equal chance 0.5.

2. ## Re: Can anyone help me with Hidden Markov question?

Hey rico.

I'm not quite familiar with what you want to do but I do understand Markov Probability Models so can you explain that given your transition matrix to go from S_t to S_t+1 and your matrix E what you are trying to find given these two constraints?

3. ## Re: Can anyone help me with Hidden Markov question?

Originally Posted by chiro
Hey rico.

I'm not quite familiar with what you want to do but I do understand Markov Probability Models so can you explain that given your transition matrix to go from S_t to S_t+1 and your matrix E what you are trying to find given these two constraints?
Please take a look at attached files. I need to do Viterbi and Forward algorithm calculation the way it shows in the table. I spent another 2 hours last night and still no luck.

5. ## Re: Can anyone help me with Hidden Markov question?

Do you only have to do it for a particular sequence or a general calculation (say for n steps)?

If it's only for particular sequence, then post your calculations for each iteration of the chain line by line and we'll see what's going on.