Markov feature && Viterbi algorithm

Source: Internet
Author: User

Due to the Markov characteristics, the path most likely to reach the state Rain5 = True contains the most likely path to a state at 4 of the arrival time------P421

What is the so-called "Markov trait"?

The Viterbi algorithm is based on the idea of dynamic programming (DP is generally optimal, not the optimal application has not yet been seen),

Take a closer look at the Viterbi algorithm state transition equation for the weather and umbrellas model,

The Viterbi algorithm is a bottom-up dynamic

It can be known that the optimal probabilistic path for solving state t+1 is based on the optimal probability path of all possible states (Rain/sunny) from start to state T.

That is, for each possible selection of state T (Rain/sunny), the fixed evidence e1~t and the state (Rain/sunny) is evaluated for the maximum value of P (x1~xt-1,xt | e1~t),

So for our example, there are P (X1~xt-1,rain | e1~t) and P (X1~xt-1,sunny | e1~t),

Then the probabilistic path of state t+1 is further obtained from the probabilistic path of state T, which comes from the collocation of examples.

Status T?????????????????? Status t+1

Rain????????????????????? Rain

Rain????????????????????? Sunny

Sunny?????????????????? Rain

Sunny?????????????????? Sunny

Again, the state is "hidden" because the guards do not know the truth outside, only the evidence---whether there is an umbrella

The basic step of dynamic planning is to transfer the state of the previous step to the state of the next step, and notice that the result of the state t+1 is a probability vector (that xt+1 uppercase)

Finally, a combination of examples to illustrate:

For Point-in-time 1 (initial point in time)

Pre-estimated rain (0.5)

???? ? ? ?? 0.9 = 0.315

???? 0.7?

??????????? 0.1

0.5

??????????? 0.2 = 0.03

????? 0.3

??????????? 0.8

Sunny of pre-estimation (0.5)

???? ? ? ?? 0.9 = 0.135

???? 0.3?

??????????? 0.1

0.5

??????????? 0.2 = 0.07

????? 0.7

??????????? 0.8

The probability that the first day's implicit variable is rain is calculated from the pre-estimate: (0.315+0.135)/(0.315+0.135+0.03+0.07) = 0.45/0.55 = 0.8182 corresponding sunny probability: 0.1818

A closer look at the part of the arrows is bold, and the bold part represents the amount of the pre-state portion of the selected set to be used to build the subsequent state [to cater to the dynamic optimization construction State transfer]

The following is an example of constructing the last state in the bottom 2nd state

???? ? ????? ? ??? |0.9 = 0.021042 [The hidden state of the last point of time is rain, evidence is umbrella]

????????? ? |0.7 |

??????????? | ???? |0.1

0.0334 |

?????? ???? | ???? | 0.2 = 0.002004 [The implicit state of the last point of time is sunny, the evidence is umbrella]

?????? ???? |0.3 |

???????? ????????? | 0.8

???? ? ????? ? ??? |0.9 = 0.004671 [The hidden state of the last point of time is rain, evidence is umbrella]

????????? ? |0.3 |

??????????? | ???? |0.1

0.0173 |

?????? ???? | ???? | 0.2 = 0.002422 [The implicit state of the last point of time is sunny, the evidence is umbrella]

?????? ???? |0.7 |

???????? ????????? | 0.8

For each of the possible hidden states, the maximum value is built at the last point in time,

| Rain---0.021042

| Sunny---0.002422

Finally, let me remind you that those painted boxes identify the "maximal matching sequence" as a result, which is returned backwards from the last state by a reverse pointer.

Does it fit perfectly? ~

Markov feature && Viterbi algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.