I've gone through Hidden Markov models (HMM) for the past few months. However there are a few things that are confusing.

The set up is simple: I have to model some human gestures such as walking, jumping, and falling. The observed data have been obtained via an accelerometer while the person was doing the movements.

I trained theses observations using the famous Baum-Welch algorithm to get the parameters of an HMM for some states. Further, using the Forward and Backward procedures, the likelihood of the observation sequences given the model (i.e., the parameters) were found.

Using a model selection criteria such as Akaike information criterion (AIC), I got the optimum states that represented the data:

a)Walking: 2 states
b)jumping: 2 states
c)Falling: 4 states


All these HMMs are then stored in a directory.

Lastly, Viterbi decoding is used to get the most likely sequence of hidden states that produced the data.

My questions are:

1. Suppose I performed the experiment again and I just get the data without knowing what kind of movement has been done. After getting the data trained, I got 2 states. How will the machine differentiate which kind of movement has been done, especially if walking and jumping are represented by 2 states?

2. Suppose the person has performed a different kind of gesture, e.g., sliding, what is the expected output after training? Will the machine be able to detect that or generate a false negative result?

• I am a little confused by the question. How many distinct models do you have? Three? In any event, there is no general answer to your point 2. HMMs can only output a sequence of existing states, so it all depends on which emissions would be closer to 'sliding' in your training sample. Commented Jun 8, 2013 at 18:28
• There are three models namely walking, jumping and falling. Commented Jun 8, 2013 at 19:05
• There are three models namely walking, jumping and falling. In my 1st question, I got two states after training the data. How is it going to know what model generated these data? And thanks for the answer for the second part. Commented Jun 8, 2013 at 19:23

I have to add that this is not a standard way of using HMMs. In general, you build a single HMM in which the states correspond to the inference you want to make. This means that you would have a single model with 3 states (walk, jump, fall), or more if each corresponds to a succession of typical moves. In my opinion, your best option is to build a model with 8 parameters, but you still have to estimate the transitions between walk, jump and fall. This way you will be able to decompose a long sequence of measurements in discrete segments where the person is walking, jumping or falling.