2

I am not that familiar with HMM, but I want to implement in Matlab. I want to use this toolbox HMM Toolbox. I am not sure if I have understood the way I have to implement it. If have many training sequences of states for different classes. So this is the way I would do it:

  1. I calculate for every sequence the transition and emission matrix by [TRANS,EMIS] = hmmestimate(seq,states) which represents a HMM
  2. I save these matrix with the information which class belongs
  3. I do this for every training sequence
  4. If I get an observation sequence for classification I use the hmmviterbi(seq,TRANS,EMIS) function for calculating the "likelyness" with every HMM I have saved.
  5. The most "likelyness" one (highest percent) was the HMM I looked for --> I know the class

Is this the way I can implement HMM?

I hope you can give me some hints

Btw. I know that my English is not that good, but I hope it is understandable.

rcs
  • 67,191
  • 22
  • 172
  • 153
xandi1987
  • 519
  • 1
  • 5
  • 17

1 Answers1

0

While I do not know matlab and cannot help you in that area, your steps sound correct. Here are the steps as I would implement them:

  • You first use your training set to create a model to represent that set.
  • Repeat this for each situation you want your system to recognise (eg. model per situation)
  • When you have an input set you compare it with each model and keep the probability/confidence scores.
  • Compare these scores and select the strongest result (providing it is over any threshold you have set)

EDIT: I have found a good example here from a previous question. To answer whether the link you provided in the comments is correct, I would have to say yes, but have not used matlab for HMM before so cannot confirm the use of those functions. I suggest that you look at the answer to the previous question link above and work through it, as it is a more in depth explanation of my simple steps above.

Community
  • 1
  • 1
Nashibukasan
  • 2,028
  • 23
  • 37
  • Thanks for answering... Can you maybe have a look to this description: http://www.mathworks.de/de/help/stats/hmmtrain.html It looks like the correct method for training, but I have no idea how should I estimate the martrix? (I want to implement a complex gesture recognition) – xandi1987 Apr 16 '13 at 20:03