Search code examples
matlabhidden-markov-modelscontinuous

Non-discrete observations in Hidden Markov Model


Considering the following question:

Issue in training hidden markov model and usage for classification

How can I use a HMM when my input data (the observation sequence) is a continuous variable and so the number of discrete observations is infinite?

Is it possible to use HMM for such continuous data? If so, how?

E.g.: consider the following code from the posted question:

Q = 3;    %# number of states (sun,rain,fog)
O = 2;    %# number of discrete observations (umbrella, no umbrella)

%# we start with a randomly initialized model
prior_hat = normalise(rand(Q,1));
A_hat = mk_stochastic(rand(Q,Q));
B_hat = mk_stochastic(rand(Q,O));  

%# learn from data by performing many iterations of EM
[LL,prior_hat,A_hat,B_hat] = dhmm_em(seqs, prior_hat, A_hat, B_hat, 'max_iter',50);

If my observational sequence (the undefined seqs in the code above) is a continuous variable, what do I do?


Solution

  • For an HMM model with continuous emissions, Mathworks team was basically proposing to discretize state's emission values and estimate the discrete model (http://www.mathworks.com/matlabcentral/answers/100850-how-can-i-use-continuous-sequence-values-with-hmmestimate-in-the-statistics-toolbox-7-1-r2009a).