jurafsky&martin_3rdEd_17 (1).pdf

# Computation of the joint probability of being in

This preview shows pages 137–140. Sign up to view the full content.

Computation of the joint probability of being in state i at time t and state j at time t + 1. The figure shows the various probabilities that need to be combined to produce P ( q t = i , q t + 1 = j , O | l ) : the a and b probabilities, the transition probability a i j and the observation probability b j ( o t + 1 ) . After Rabiner (1989) which is c 1989 IEEE. Figure 9.14 shows the various probabilities that go into computing not-quite- x t : the transition probability for the arc in question, the a probability before the arc, the b probability after the arc, and the observation probability for the symbol just after the arc. These four are multiplied together to produce not-quite- x t as follows: not-quite- x t ( i , j ) = a t ( i ) a i j b j ( o t + 1 ) b t + 1 ( j ) (9.34) To compute x t from not-quite- x t , we follow the laws of probability and divide by P ( O | l ) , since P ( X | Y , Z ) = P ( X , Y | Z ) P ( Y | Z ) (9.35) The probability of the observation given the model is simply the forward proba- bility of the whole utterance (or alternatively, the backward probability of the whole utterance), which can thus be computed in a number of ways: P ( O | l ) = a T ( q F ) = b T ( q 0 ) = N X j = 1 a t ( j ) b t ( j ) (9.36) So, the final equation for x t is x t ( i , j ) = a t ( i ) a i j b j ( o t + 1 ) b t + 1 ( j ) a T ( q F ) (9.37) The expected number of transitions from state i to state j is then the sum over all t of x . For our estimate of a i j in Eq. 9.31 , we just need one more thing: the total

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
138 C HAPTER 9 H IDDEN M ARKOV M ODELS expected number of transitions from state i . We can get this by summing over all transitions out of state i . Here’s the final formula for ˆ a i j : ˆ a i j = P T - 1 t = 1 x t ( i , j ) P T - 1 t = 1 P N k = 1 x t ( i , k ) (9.38) We also need a formula for recomputing the observation probability. This is the probability of a given symbol v k from the observation vocabulary V , given a state j : ˆ b j ( v k ) . We will do this by trying to compute ˆ b j ( v k ) = expected number of times in state j and observing symbol v k expected number of times in state j (9.39) For this, we will need to know the probability of being in state j at time t , which we will call g t ( j ) : g t ( j ) = P ( q t = j | O , l ) (9.40) Once again, we will compute this by including the observation sequence in the probability: g t ( j ) = P ( q t = j , O | l ) P ( O | l ) (9.41) o t+1 α t (j) o t-1 o t s j β t (j) Figure 9.15 The computation of g t ( j ) , the probability of being in state j at time t . Note that g is really a degenerate case of x and hence this figure is like a version of Fig. 9.14 with state i collapsed with state j . After Rabiner (1989) which is c 1989 IEEE. As Fig. 9.15 shows, the numerator of Eq. 9.41 is just the product of the forward probability and the backward probability: g t ( j ) = a t ( j ) b t ( j ) P ( O | l ) (9.42) We are ready to compute b . For the numerator, we sum g t ( j ) for all time steps t in which the observation o t is the symbol v k that we are interested in. For the denominator, we sum g t ( j ) over all time steps t . The result is the percentage of the
9.5 HMM T RAINING : T HE F ORWARD -B ACKWARD A LGORITHM 139 times that we were in state j and saw symbol v k (the notation P T t = 1 s . t . O t = v k means “sum over all t for which the observation at time t was v k

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern