|
First Guess and Truth |
  |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Input |   |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
State Sequences (Paths) and Transition Sequences |
  |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Observations: |   |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Path Probabilities |
  |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Count Calculation |
  |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Probability Calculation |
  |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Homework Problem 1 |
  |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Transition Probability Estimate |
Concept: For transition si[wk]sjcount the number of time si[wk]sj was taken and divide by the total number of times a transition from si was taken.
|
(1) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Count Calculation |
Concept: For each path s1,n+1 and each transition si[wk]sj count the number of time si[wk]sj appears in s1,n+1 given output w1,n (Charniak's "eta" in 4.20):
For each path s1,n+1 and each transition si[wk]sj multiply the eta times the probability of the path given the output.
|
(2) | ||||||||||
|
Normalization Factor |
Concept: In principle the "path probability" we compute by multiplying all the transition probabilities on a path are JOINT probabilities:
But the probabilities we are multiplying counts by in Equation (2)[Charniak's 4.20] are conditional:
So we "normalize" using the chain rule:
Notice however that in our example Maximum Likelihood iteration we never divided by a normalization factor. This is because ALL our counts need to be divided by a normalization factor. But then in equation (1) we divide count by counts:
|
  |
|
Eliminating State sequences from Max- Likelihood Estimation |
Our naive MLE algorithm summed over all state-sequences. That is, we needed to find the probabilities of all paths through the model given the corpus. In general this is exponential. Bad. We try to fix this by rethinking Counts:
The second probability in the product can have the chain rule REapplied:
Substituting back in (5):
We now make use of the Markov asumption, that transition probabilities depend, at most, on the input, the previous state, and the next state: That is,
Substituting in (6), we have:
But HOLY COW! Recall the definition of alphai(t):
|
|---|
|
Steps in Re-estimation |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Forward- Probabilities |
alphai(t) is what goes in each cell of the table:
Initialization of algorithm: Time: t=1
Time t=2:
From a: P(a[0]a)=.48 alphaa(1)= 1.0 P(a[0]a) * alphaa(1)=.48 From b: P(b[0]a)=.48 alphab(1)= 0 P(b[0]a) * alphaa(1)=0 alphaa(2)= .48 + 0 = .48 Computation of alphab(2)
From a: P(a[0]b)=.04 alphaa(1)= 1.0 P(a[0]b) * alphaa(1)=.04 From b: P(b[0]b)=0 alphab(1)= 0 P(b[0]b) * alphaa(1)=0 alphaa(2)= .04 + 0 = .04 Time: t=6
From a: P(a[1]a)=.48 alphaa(2)=.48 P(a[1]a) * alphaa(2)=.23 From b: P(b[1]a)=1.0 alphab(2)= .04 P(b[1]a) * alphaa(2)=.04 alphaa(3)= .23 + .04 = .27 Computation of alphab(3)
From a: P(a[1]b)=0 alphaa(2)= .48 P(a[1]b) * alphaa(2)=0 From b: P(b[1]b)=0 alphab(2)= .04 P(b[1]b) * alphaa(2)=0 alphaa(3)= 0 + 0 = 0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backward- Probabilities |
betai(t) is what goes in each cell of the table:
Initialization of algorithm: Time: t=6
Time t=5:
To a: P(a[1]a)=.48 betaa(6)= 1.0 P(a[1]a) * betaa(6)=.48 To b: P(a[1]b)=0 betab(6)= 1.0 P(a[1]b) * betab(6)=0 betaa(5)= .48 + 0 = .48 Computation of betab(5):
To a: P(b[1]a)= 1.0 betaa(6)= 1.0 P(b[1]a) * betaa(6)=1.0 To b: P(b[1]b)=0 betab(6)= 0 P(b[1]b) * betab(6)=0 betab(5)= 1.0 + 0 = 1.0 Time: t=1
To a: P(a[1]a)=.48 betaa(5)=.48 P(a[1]a) * betaa(5)=.23 To b: P(a[1]b)=0 betab(5)= 1.0 P(a[1]b) * betaa(5)=0 betaa(4)= .23 + 0 = .23 Computation of betab(4):
To a: P(b[1]a)=1.0 betaa(5)= .48 P(b[1]a) * betaa(5)=.48 To b: P(b[1]b)=0 betab(5)= 1.0 P(b[1]b) * betaa(5)=0 betab(4)= .48 + 0 = .48 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Re-estimated Counts |
In each cell of table:
Computation of Count(a[0]b) for time tick 1
Computation of Count(a[0]b) for time tick 3
Computation of Count(a[0]a) for time tick 3
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||