# Hidden Markov Model application

I'm very new to the field of AI and HMMs. My question is can HMMs be used to model any time series data? Or does the data have to be that of a Markov process?

In HTK documentation, I see that the first few lines state that it can model any time series ("HTK is a toolkit for building Hidden Markov Models (HMMs). HMMs can be used to model any time series and the core of HTK is similarly general-purpose.")

When you say can be, yes you can fit any time series (with/without external variables) using HMM, but there are some constrains:

1) It should follow Markov property.
2) There are some variance that other models are not able to capture (in other words, system is partially observable).

Adding to point 1, for HMM it should hold true, but the way Baum Welch Algorithm works, indirectly it considers the values of more than previous state for hmm(order-1). The t-1 state depends of t-2 which in turn depends on t-3. The calculation of parameters ( transition, emission, starting probabilities) happens over multiple iterations and it finds parameters in such a way that holds Markov property true.

I think when they say 'any', they means even when you don't have all variables needed to forecast future values.

• Thanks Arpit for the explanation. I'm new to this topic so at times get confused even on minor wording issues like this! – vinjk Aug 18 '17 at 7:59

It can be used to model sequential data which is composed of discrete tokens and should generally follow the "Markov property", which is the assumption that the probability of a class/label given observation depends only on the preceding class/label (rather than on some longer sequence).

• I'm sure this is not a valid answer. – HelloWorld Aug 5 '17 at 2:53
• I think the intention of asking this question is get a conceptual definition of what kind of time series can be modeled. – drw Aug 5 '17 at 3:11
• But time series is not Markov. Your answer doesn't answer the question wherther HMM can be used for non-Markov process. – HelloWorld Aug 5 '17 at 3:20
• A process with the Markov property is a Markov process. The type of time series itself does not define whether it can be modeled with a Markov process. That is a hypothesis/assumption that is leveraged. – drw Aug 5 '17 at 3:31
• @drwiner is right. My intention is to understand the topic at a conceptual level. So the statement I quoted is wrong? – vinjk Aug 5 '17 at 10:47