So, good day. We are the 3rd group.
Today, I’ll introduce some examples of Hidden Markov Model.
So let’s start from a very simple example.
It is adapted from Wikipedia.
Imagine you have a girlfriend. You meet her every night,
And when you meet her, she kisses you or beats you or does nothing.
What she does depends on her feeling during the daytime.
But you do not know how she is feeling during the daytime because you cannot meet her in the daytime.
So every night you meet her, she does something
And you would like to get the answer. So how is she feeling during the daytime? Happy or unhappy?
So we build a Hidden Markov Model for this example because you do not know how she is feeling, happy or unhappy.
It is a hidden state.
But she kisses you or beats you or does nothing when you meet her.
So you can know this information. It is observation.
So, what we are going to do is using the hidden information, using the observation to infer the hidden state.
Your girlfriend has some parameters.
The 1st day, she has the probability of 0.6 happy and probability of 0.4 unhappy.
During the following days, she is happy or unhappy depends on the previous day.
If she is happy in the previous day, she will be happy in the probability of 0.7 and unhappy in the probability of 0.3.
And unhappy is the similar. So this is the transition probability.
And um, if she is happy, she has the probability of 0.5 to kiss you, and probability of 0.4 to beat you and 0.1 probability to do nothing.
And unhappy is the similar. So this is the initiation probability.
Now you have met you girlfriend in the continuous 3 days.
In the first day, she will kiss you, second day beat you and the third day she will do nothing.
So how is she during the three days? Happy or unhappy?
So we will use dynamic programming algorithm, called the Viterbi algorithm, to get the answer.
I think we are already familiar with it
In the first day, there is a probability 0.6 if she is happy. And if she is happy, the probability is 0.5 when she kiss you
And so the probability that she is happy in the first day and kiss you at the first night is 0.3
And similarly, as the same as the unhappy state that she beats you at the second night.
So during the second night ,she beats you.
So if she is happy in the first day, it is the probability of 0.7 that she is still happy in the second day.
If she is happy in the second day the probability that she beats you is 0.4.
and so, if she is happy and kiss you in the first day while she is happy in the second day but beat you, the probability should be 0.084.
And the other three situations should be similar
We get the higher happy probability 0.084.
The higher unhappy probability is 0.0072.
So we get this path and also this path for the unhappy statistic.
This is similar in the third day.
So now by the high probability we get this path.
So it is mostly likely that she is happy in the first day, still happy in the second day and unhappy in the third day.
So we use the Hidden Markov Models to solve this question.