Hidden Markov Model (HMM) - premise

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  Z_{i} is the hidden state and  X_{i} is the observed state

The basic premise;

        1. The current state is only related to the previous state

                P(Z_{_{t}}|Z_{_{t-1}},X_{_{t-1}},Z_{_{t-2}},X_{_{t-2}},...,Z_{_{1}},X_{_{1}})=P(Z_{_{t}}|Z_{_{t-1}})

        2. An observation is only related to the state that generated it

                P(X_{_{t}}|Z_{_{t}},X_{_{t}},Z_{_{t-1}},X_{_{t-1}},...,Z_{_{1}},X_{_{1}})=P(X_{_{t}}|Z_{_{t}})

 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 \lambda = \left ( \pi ,A,B \right ), O = \left \{o_{1},o_{2} ,...,o_{T} \right \}calculate the probability of occurrence with the observation sequenceP(O |\lambda)

        2. Given the observation sequence O = \left \{o_{1},o_{2} ,...,o_{T} \right \}, solve the parameters \lambda = \left ( \pi ,A,B \right )so that P(O |\lambda)the maximum

        3. Know the model \lambda = \left ( \pi ,A,B \right )and observation sequence O = \left \{o_{1},o_{2} ,...,o_{T} \right \}to find the state sequence, so that P(I|O,\lambda )the maximum

Guess you like

Origin blog.csdn.net/weixin_43284996/article/details/127321108