1

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?

Community
  • 1
  • 1
Jean-Paul
  • 19,910
  • 9
  • 62
  • 88
  • 1
    see here if you're using Kevin Murphy's HMM toolbox: http://www.cs.ubc.ca/~murphyk/Software/HMM/hmm_usage.html (look under "HMMs with mixture of Gaussians outputs"). You want to use the `mhmm` set of functions – Amro Oct 29 '14 at 23:31
  • 1
    You could also use the more general BNT Toolbox by the same author: http://bnt.googlecode.com/svn/trunk/docs/usage_dbn.html#hmm – Amro Oct 29 '14 at 23:37
  • @Amro: The last link seems quite relevant but might be an overkill for my problem at hand. – Jean-Paul Oct 30 '14 at 09:54

1 Answers1

2

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).

Kostya
  • 1,552
  • 1
  • 10
  • 16
  • Seems useful. Thank you. What do you think of regime-switching markov models? Could they be made 'hidden' as well? – Jean-Paul Oct 29 '14 at 23:00
  • @Jean-Paul Have seen this https://sites.google.com/site/marceloperlin/matlab-code/ms_regress---a-package-for-markov-regime-switching-models-in-matlab? – Kostya Oct 29 '14 at 23:34