Hidden Markov Model (HMM) is a statistical model
1. Markov model
First-order Markov model: the current state of the model depends only on the previous state
Elements: initial state, state, state transition probability
This assumption greatly simplifies the system, but also causes some information of the system to be lost.
For example, there are three states [sun, cloud, rain]
The state transition probability is as follows:
Initial state:
The weather probability for the next few days can be calculated:
2. Hidden Markov Model
where is the hidden state and is the observed state
The basic premise;
1. The current state is only related to the previous state
2. An observation is only related to the state that generated it
Composition (three must):
1. Initial probability (π)
2. Hidden state transition probability matrix (A)
3. Generate the observed state probability matrix (B)
HMM = (π, A, B)
Suppose we are in a basement and cannot observe the weather conditions of the day, but we can obtain weather indicators such as temperature, humidity, and wind direction of the day through some equipment. Then the weather that cannot be observed is the hidden state, and the weather indicators that can be observed are the observed state.
HMM assumes that the state is only related to the previous state, that is, today's weather is only related to the weather of the previous day. An observation is only related to the state that generated it, that is, today's weather indicator is only related to today's weather.
The initial probability is the probability matrix of the weather on the first day. The hidden state transition probability matrix is the probability of switching between different weathers. Generating the observation probability matrix is the probability of generating the corresponding weather index for each weather.
It can be seen that today’s weather is not limited to the previous day’s weather, and today’s weather indicators are not only affected by today’s weather, so the assumption of the HMM model greatly simplifies the system, but it also causes some information in the system to be lost.
Problem to be solved:
1. Given the model , calculate the probability of occurrence with the observation sequence
2. Given the observation sequence , solve the parameters so that the maximum
3. Know the model and observation sequence to find the state sequence, so that the maximum