Download presentation
Presentation is loading. Please wait.
1
Dishonest Casino Let’s take a look at a casino that uses a fair die most of the time, but occasionally changes it to a loaded die. This model is hidden because we see the sequence of rolls, but we don’t know which die was used for each roll.
2
Assumptions Suppose that we know the expected behavior of the fair and the loaded die, and the probability of switching between them. The emission and transition probabilities for both dies are depictured below
3
Finding the most probable path There are two states in this model: Fair and Loaded Finding the path of states for a specific rolls sequence is determining what was the state (or which die was used) for each particular roll in this sequence. One way to do it is to try all the possible state combinations and to compute probability for each of them in the following way:
4
The Viterbi Algorithm There are a few algorithms for finding the most probable states in HMM: Viterbi, forward, Baum- Welch The most common is Viterbi, for its speed / accuracy ratio. The result that interests us is In the Viterbi algorithm the most probable path is found recursively
5
The result produced by Viterbi algorithm
6
How it works Suppose that we know the probability Vk(i) of the most probable path ending in state k with observation X i for each k. Then the probabilities for V l (i+1) can be computed in the following way: The initial condition is V 0 (0) = 1. By keeping pointers backwards, the actual state sequence can be found by backtracking
7
The Viterbi algorithm Now let’s see how it is implemented in Mathematica
8
Bibliography “Biological Sequence Analysis”, R.Durbin
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.