Hidden Markov Model Multiple Observation values for each state

hidden-markov-models, matlab

Solution

If you know the hidden state sequence, then max likelihood estimation is trivial: it's the normalized empirical counts. In other words, count up the transitions and emissions and then divide the elements in each row by the total counts in that row.

In the case where you have multiple observation variables, code the observations as a vector where each element gives the value of one of the random variables on that time step, e.g. '{lights=1, computer=0, Heart Rate >100 = 1, location =0}'. The key is that you need to have the same number of observations at each time step or else things will be much more difficult.

Problem

I am new to Hidden Markov Model. I understand the main idea and I have tried some Matlab built-in HMM functions to help me understand more. If I have a sequence of observations and corresponding states, e.g. ``` seq = 2 6 6 1 4 1 1 1 5 4 states = 1 1 2 2 2 2 2 2 2 2 ``` and I can use hmmestimate function to calculate transition and emission probability matrices as: ``` [TRANS_EST, EMIS_EST] = hmmestimate(seq, states) ``` TRANS_EST = ``` 0.5000 0.5000 0 1.0000 ``` EMIS_EST = ``` 0 0.5000 0 0 0 0.5000 0.5000 0 0 0.2500 0.1250 0.1250 ``` In the example, the observation is just a single value. The example picture below describes my situation. If I have states: {Sleep, Work, Sport}, and I have a set of observations: {lightoff, light on, heart rate>100 .....} If I use number to represent each observation, in my situation each state has multiple observations at the same time, ``` seq = {2,3,5} {6,1} {2} {2,3,6} {4} {1,2} {1} states = 1 1 2 2 2 2 2 ``` I have no idea how to implement this in Matlab to get transition and emission probability matrix. I am quite lost, what shall I do in the next step? Am I using the right approach? Thanks!

Original source