40 likes | 65 Views
Explore the dynamic programming approach for cone computations and Hidden Markov Models. Understand the calculations and spread analysis using a practical example.
E N D
The dynamic programming computation of a. (b is similar but works back from Stop.) Day 1: 2 cones Day 2: 3 cones Day 3: 3 cones a=0.1*0.08+0.1*0.01 =0.009 a=0.009*0.08+0.063*0.01 =0.00135 a=0.1 p(C|C)*p(3|C) p(C|C)*p(3|C) C C C p(C|Start)*p(2|C) 0.8*0.1=0.08 0.8*0.1=0.08 p(C|H)*p(3|C) p(C|H)*p(3|C) 0.5*0.2=0.1 0.1*0.1=0.01 0.1*0.1=0.01 p(H|C)*p(3|H) p(H|C)*p(3|H) Start 0.1*0.7=0.07 0.1*0.7=0.07 p(H|Start)*p(2|H) p(H|H)*p(3|H) 0.5*0.2=0.1 p(H|H)*p(3|H) H H H 0.8*0.7=0.56 0.8*0.7=0.56 a=0.1 a=0.1*0.07+0.1*0.56 =0.063 a=0.009*0.07+0.063*0.56 =0.03591 Figure for HMM Spreadsheet 600.465 - Intro to NLP - J. Eisner
The dynamic programming computation of a. (b is similar but works back from Stop.) Day 1: 2 cones Day 2: 3 cones Day 3: 3 cones a=0.1*0.08+0.1*0.01 =0.009 a=0.009*0.08+0.063*0.01 =0.00135 a=0.1 p(C|C)*p(3|C) p(C|C)*p(3|C) C C C p(C|Start)*p(2|C) 0.8*0.1=0.08 0.8*0.1=0.08 p(C|H)*p(3|C) p(C|H)*p(3|C) 0.5*0.2=0.1 0.1*0.1=0.01 0.1*0.1=0.01 p(H|C)*p(3|H) p(H|C)*p(3|H) Start 0.1*0.7=0.07 0.1*0.7=0.07 p(H|Start)*p(2|H) p(H|H)*p(3|H) 0.5*0.2=0.1 p(H|H)*p(3|H) H H H 0.8*0.7=0.56 0.8*0.7=0.56 a=0.1 a=0.1*0.07+0.1*0.56 =0.063 a=0.009*0.07+0.063*0.56 =0.03591 Figure for HMM Spreadsheet 600.465 - Intro to NLP - J. Eisner
The dynamic programming computation of m. (u is similar but works back from Stop.) Day 1: 2 cones Day 2: 3 cones Day 3: 3 cones m=max(0.1*0.08,0.1*0.01) =0.008 m=max(0.008*0.08+0.056*0.01) =0.00064 m=0.1 p(C|C)*p(3|C) p(C|C)*p(3|C) C C C p(C|Start)*p(2|C) 0.8*0.1=0.08 0.8*0.1=0.08 p(C|H)*p(3|C) p(C|H)*p(3|C) 0.5*0.2=0.1 0.1*0.1=0.01 0.1*0.1=0.01 p(H|C)*p(3|H) p(H|C)*p(3|H) Start 0.1*0.7=0.07 0.1*0.7=0.07 p(H|Start)*p(2|H) p(H|H)*p(3|H) 0.5*0.2=0.1 p(H|H)*p(3|H) H H H 0.8*0.7=0.56 0.8*0.7=0.56 m=0.1 m=max(0.1*0.07+0.1*0.56) =0.056 m=max(0.008*0.07+0.056*0.56) =0.03136 Figure for HMM Spreadsheet Viterbi-approximation version 600.465 - Intro to NLP - J. Eisner
The dynamic programming computation of m. (u is similar but works back from Stop.) Day 1: 2 cones Day 2: 3 cones Day 3: 3 cones m=max(0.1*0.08,0.1*0.01) =0.008 m=max(0.008*0.08+0.056*0.01) =0.00064 m=0.1 p(C|C)*p(3|C) p(C|C)*p(3|C) C C C 0.8*0.1=0.08 0.8*0.1=0.08 Start p(H|Start)*p(2|H) p(H|H)*p(3|H) 0.5*0.2=0.1 p(H|H)*p(3|H) H H H 0.8*0.7=0.56 0.8*0.7=0.56 m=0.1 m=max(0.1*0.07,0.1*0.56) =0.056 m=max(0.008*0.07+0.056*0.56) =0.03136 p(C|Start)*p(2|C) p(C|H)*p(3|C) p(C|H)*p(3|C) 0.5*0.2=0.1 0.1*0.1=0.01 0.1*0.1=0.01 p(H|C)*p(3|H) p(H|C)*p(3|H) 0.1*0.7=0.07 0.1*0.7=0.07 Figure for HMM Spreadsheet Viterbi-approximation version 600.465 - Intro to NLP - J. Eisner