I have a binary sequence,how to calculate Gilbert-Elliott model probabilities in Matlab?

Hey, I have a very long sequence of 1's and 0's and I want to use hmmestimate to find the probabilities of the GE model. Can one show a simple example of how I can do it in Matlab?
I have checked the Matlab hmmestimate help page, but it didn't help, because I do not understand the meaning of 'states'. All I have is a binary sequence to start from, nothing else and I guess this sequence is the seq vector in the help page. Thanks!

Answers (3)

Does every "0" correspond to one setting, and every "1" correspond to a different setting? Or are there combinations of 0's and 1's that, taken together, indicate the setting, such as (for example) 0 by itself indicating one setting, 10 indicating a second setting, and 11 indicating a third setting?
If there are only 2 settings then you have only two states, which you can give names to such as
hmmestimate(..., 'statenames', {'stop', 'go'});
I have only 2 states: packet came ('1') and packet lost ('0'). So what I want to do with the whole thing is to find the probabilities that channel goes from bad state to bad , good to good, bad to good and good to bad.So what would be the steps in that case with hmmestimate?

1 Comment

State 1: packet is not present. State 2: packet is present. "Came" or "lost" then map into those states. Two states, state numbers 1 and 2. 0 transits to state 1, 1 transits to state 2. hmm estimation should then have no trouble filling in the state transition probabilites.

Sign in to comment.

Maybe my lack of understanding of difference between sequence and states is the problem. Matlab help says:
TR = estimate of the transition, E = emission probabilities of an HMM for sequence, SEQ, with known states, STATES.
What is the difference between sequence and states? I think that sequence is what I have (the record of successes and failures) and I think states are 2: success and failure. Am I right? If so, why does Matlab ask that input sequence and states must be the same length?
This is what I did:
ind_seq is my sequence of 1's and 0's, that's the only input that I have (packet losses and successes). Then I type:
[TR, E] = hmmestimate(ind_seq,'statenames',{'good' 'bad'})
and Matlab error message says:
Error using hmmestimate (line 65) Input sequence and states must be the same length.

Asked:

on 22 Feb 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!