I have a particular problem, and I would like to know if using a HMM is the correct tool for it. Apologies for the poor wording of the problem, HMMs are definitely not my specialty.
I have the following data:
- Several sequences of continuous values
- Each sequence can be of a different length
- All sequences come from the same underlying Markov chain
- The number of states (N) is known
- The structure of the Markov chain is known: a state always stays as the same state ($N_i$) or transitions to the next state ($N_{i+1}$)
I would like to segment a sequence into the underlying states to be able to calculate the mean value of each state.
For example:
# observable values
x = [0.80, 0.75, 0.85, 1.20, 1.15, 1.20, 1.15, 2.10, 2.05, 2.10]
# label states (we do not know)
y = [ A, A, A, B, B, B, B, C, C, C]
# what I would like to learn in the end
state_means = {'A': 0.80, 'B': 1.175, 'C: 2.075}
I have the feeling that it might be possible to train a HMM with the objective function to minimize the mean squared error between the estimated state_means
and the observed values.