Markov Process and Hidden Markov Model

176 views

Hey there, I’m taking an exam in a few days and it includes HMMs (hidden markov models). I find that i cannot wrap my head around it the way my prof is explaining it (X/Y states). Could someone explain in simpler terms? thank you

In: 5

2 Answers

Anonymous 0 Comments

Lets first discuss Markov Processes. I’ll be using a game of Monopoly as an example (I recommend pulling up a picture of a Monopoly board to help with visualizations). Lets say we want to predict what is the next square we land on, and we know all the previous squares we’ve been on. For example, the last 3 squares were “Boardwalk”, “Income Tax”, and “Vermont Avenue” and we want to predict the most likely next square.

The defining characteristic of a Markov process is that we only need the current state to predict the probabilities for the next state; we do not need the entire history of states. This is true for Monopoly (ignoring some of the rules about rolling doubles). In the example above, if our current state is “Vermont Avenue” we can predict the next state to be most likely “Pennsylvania Railroad” since rolling a 7 is the most likely outcome.

Next we can talk about Hidden Markov Models. Imagine a variant of the above example, but now we are only told the color/type of the squares we’ve been on, and we want to predict the color of the next square. For example, if we are currently on a railroad, what is the probability of next landing on a yellow square? This is not a Markov process, because knowing the entire history gives more information than just knowing the current state. In the example, if you knew the last 2 states were a red square then a railroad then you might predict a high probability of the next state being yellow; compared to if the last 2 states were a green square then a railroad. However, this does resemble a Hidden Markov Model, where there are some hidden states that follow a Markov process and those hidden states produce the states we can directly observe.

In the Monopoly example, the hidden states are the exact names of the squares (“Vermont Avenue”, “Boardwalk”, etc). These follow a Markov process. And, the exact names produce our observations (red square, railroad, etc). If we knew the current hidden state, we could predict the next hidden state using the Markov process, then predict the next observation from that hidden state. Since the hidden states are hidden, we don’t know those states exactly, but we can predict them using probability to form the Hidden Markov Model.

One thing to note is that usually, the observation states are also produced from the hidden states with some probability. In the Monopoly example, the observations are produced exactly from the hidden states (“Pennsylvania Railroad” will produce “railroad” with 100% probability) but this may not always be the case. To give another example, we could have a model where the hidden states are the days of the week (Monday, Tuesday, …) and the observation states are whether or not you go to work. Most of the times you go to work on the week days and stay at home on the weekends, but sometimes you call in sick on week days, or there is a work emergency and you get called in on the weekends. In this example, the transition probabilities between the hidden states are 100%, but the emission probabilities from the hidden states to the observable states are not 100%.

Anonymous 0 Comments

Lets first discuss Markov Processes. I’ll be using a game of Monopoly as an example (I recommend pulling up a picture of a Monopoly board to help with visualizations). Lets say we want to predict what is the next square we land on, and we know all the previous squares we’ve been on. For example, the last 3 squares were “Boardwalk”, “Income Tax”, and “Vermont Avenue” and we want to predict the most likely next square.

The defining characteristic of a Markov process is that we only need the current state to predict the probabilities for the next state; we do not need the entire history of states. This is true for Monopoly (ignoring some of the rules about rolling doubles). In the example above, if our current state is “Vermont Avenue” we can predict the next state to be most likely “Pennsylvania Railroad” since rolling a 7 is the most likely outcome.

Next we can talk about Hidden Markov Models. Imagine a variant of the above example, but now we are only told the color/type of the squares we’ve been on, and we want to predict the color of the next square. For example, if we are currently on a railroad, what is the probability of next landing on a yellow square? This is not a Markov process, because knowing the entire history gives more information than just knowing the current state. In the example, if you knew the last 2 states were a red square then a railroad then you might predict a high probability of the next state being yellow; compared to if the last 2 states were a green square then a railroad. However, this does resemble a Hidden Markov Model, where there are some hidden states that follow a Markov process and those hidden states produce the states we can directly observe.

In the Monopoly example, the hidden states are the exact names of the squares (“Vermont Avenue”, “Boardwalk”, etc). These follow a Markov process. And, the exact names produce our observations (red square, railroad, etc). If we knew the current hidden state, we could predict the next hidden state using the Markov process, then predict the next observation from that hidden state. Since the hidden states are hidden, we don’t know those states exactly, but we can predict them using probability to form the Hidden Markov Model.

One thing to note is that usually, the observation states are also produced from the hidden states with some probability. In the Monopoly example, the observations are produced exactly from the hidden states (“Pennsylvania Railroad” will produce “railroad” with 100% probability) but this may not always be the case. To give another example, we could have a model where the hidden states are the days of the week (Monday, Tuesday, …) and the observation states are whether or not you go to work. Most of the times you go to work on the week days and stay at home on the weekends, but sometimes you call in sick on week days, or there is a work emergency and you get called in on the weekends. In this example, the transition probabilities between the hidden states are 100%, but the emission probabilities from the hidden states to the observable states are not 100%.