How many observations should you present to "hmmdecode" in order to get a reliable estimate of state?

1 view (last 30 days)
Assume that I present 9000(the past 9000 days) observations to "hmmestimate" and now have my estimated transmission and emission matrices. If I wanted to determine what state I am in today, how many observations I would pass to "hmmdecode"? Does it matter if I present the last 20( 20 days) observations to "hmmdecode" or if I just present the most recent observation(today)?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Feb 2021
Edited: MathWorks Support Team on 25 Feb 2021
This is problem dependent, it depends on the transition matrix. Firstly, when using an HMM for prediction, it is enough to look at the forward probabilities (third output argument of "hmmdecode"). 
To understand the transient of the model one can plot the forward probability in the last time point versus different sequence lengths.Example:
tr = [0.95,0.05; 0.10,0.90];e = [1/6, 1/6, 1/6, 1/6, 1/6, 1/6;1/10, 1/10, 1/10, 1/10, 1/10, 1/2;]; obs = randi(6,[1,1000]);
for i = 1:100[p,l,f,b] = hmmdecode(obs(end-i:end),tr,e);fp(:,i) = f(:,end);end
figureplot(fp')xlabel('Seq length')ylabel('\alpha_t_+_1')title('Forward probability vs Sequence Length')
If you do not have an ergodic transition probability, you may augment your model as explained in 
to set a different initial state distribution, this will help minimizing the effects of the transient.

More Answers (0)

Products


Release

R2014a

Community Treasure Hunt

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

Start Hunting!