hidden markov models biostatistics 615 815 lecture 12
play

Hidden Markov Models Biostatistics 615/815 Lecture 12: . . . . - PowerPoint PPT Presentation

. . February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang February 15th, 2011 Hyun Min Kang Hidden Markov Models Biostatistics 615/815 Lecture 12: . . . . . . Summary . . Example Viterbi HMM Graphical Models . .


  1. . . February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang February 15th, 2011 Hyun Min Kang Hidden Markov Models Biostatistics 615/815 Lecture 12: . . . . . . Summary . . Example Viterbi HMM Graphical Models . . . . . . . . . . . . . 1 / 27 . . . . . . . . . . . . . . . .

  2. . Example February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang independence between random variables. independent Graphical Models 101 . . Summary Viterbi . . . . . . . . . . . . . 2 / 27 Graphical Models HMM . . . . . . . . . . . . . . . . • Marriage between probability theory and graph theory • Each random variable is represented as vertex • Dependency between random variables is modeled as edge • Directed edge : conditional distribution • Undirected edge : joint distribution • Unconnected pair of vertices (without path from one to another) is • A powerful tool to represent complex structure of dependence /

  3. . Example February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang Are H and P independent given S ? . An example graphical model Summary . 3 / 27 Viterbi HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . *% 1% !% ;(0<-=4% ./<44% 658(49$32":% >3<5$32% 6?3,0<,:3% 12344+23% !"#$% *+,,-% 12343,5% &'()% &./(+0-% &6743,5% 12@1B*A % 12@!A % 12@*B!A % • Are H and P independent?

  4. . Viterbi February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . An example graphical model Summary . Example 3 / 27 HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . *% 1% !% ;(0<-=4% ./<44% 658(49$32":% >3<5$32% 6?3,0<,:3% 12344+23% !"#$% *+,,-% 12343,5% &'()% &./(+0-% &6743,5% 12@1B*A % 12@!A % 12@*B!A % • Are H and P independent? • Are H and P independent given S ?

  5. . Description (S) Low 0 Cloudy 0 Description (H) H S 1 . . . . . . 0.7 Sunny . Sunny February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang 0.9 High 1 1 0 0.1 High 1 Cloudy 0 0.3 Low . 4 / 27 . . . . . . . . . . . . . . . Graphical Models HMM Viterbi Example . Summary Example probability distribution . . . . . 0.7 High 1 0.3 Low 0 Description (H) Value (H) . . . . . . . . . . . . . . . . . . . . Pr ( H ) Pr ( H ) Pr ( S | H ) Pr ( S | H )

  6. . 0 Description (S) 0 Absent 0 Cloudy 0.5 1 Present 0 Cloudy 0.5 Absent . 1 Sunny 0.1 1 Present 1 Sunny 0.9 Hyun Min Kang Biostatistics 615/815 - Lecture 12 February 15th, 2011 S Description (P) P Summary . . . . . . . . . . . . . Graphical Models HMM Viterbi Example . . Probability distribution (cont’d) . . . . . . . . 5 / 27 . . . . . . . . . . . . . . . . Pr ( P | S ) Pr ( P | S )

  7. . 1 1 0.105 0 1 0 0.009 0 1 1 0.081 1 0 0 0.035 0 . 1 0.035 1 1 0 0.063 1 1 1 0.567 increases exponentially Hyun Min Kang Biostatistics 615/815 - Lecture 12 February 15th, 2011 0 0 0.105 . . . . . . . . . . . . . . Graphical Models HMM Viterbi Example . Summary 0 Full joint distribution . . 0 0 P S H . . . . . . 6 / 27 . . . . . . . . . . . . . . . . Pr ( H , S , P ) Pr ( H , S , P ) • With a full join distribution, any type of inference is possible • As the number of variables grows, the size of full distribution table

  8. . . 0 S P S H . . . . . . 0.750 . . 0.7875 1 1 1 0.0875 1 0 1 0 0 . 1 February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang 0.900 1 1 0.875 1 1 0.100 0 0 0.125 1 0 0.500 0 1 0.250 0 1 0.500 0.1125 1 1 . H . . . . . . . . Summary S . Example Viterbi HMM Graphical Models . . . . . . . . . . . . . 0 P 7 / 27 1 0.1250 0 1 1 0.1250 0 1 0 0 0.3750 0 1 0 0.3750 0 0 0 0.0125 0 . . . . . . . . . . . . . . . . Pr ( H , P | S ) = Pr ( H | S ) Pr ( P | S ) Pr ( H , P | S ) Pr ( H , P | S ) Pr ( H | S ) , Pr ( P | S ) Pr ( H | S ) Pr ( P | S )

  9. . Viterbi February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . H and P are conditionally independent given S Summary . Example 8 / 27 . HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . *% 1% !% ;(0<-=4% ./<44% 658(49$32":% >3<5$32% 6?3,0<,:3% 12344+23% !"#$% *+,,-% 12343,5% &'()% &./(+0-% &6743,5% 12@!A % 12@1B*A % 12@*B!A % • H and P do not have direct path one from another • All path from H to P is connected thru S . • Conditioning on S separates H and P

  10. . Viterbi February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . Summary . Example Conditional independence in graphical models 9 / 27 HMM . Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . '()!+ " !" '()#*!+ " #" '()$*#+ " '()&*#+ " '()%*#+ " $" %" &" • Pr ( A , C , D , E | B ) = Pr ( A | B ) Pr ( C | B ) Pr ( D | B ) Pr ( E | B )

  11. . . February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang dependency), A is independent of all the other nodes. Markov Blanket Summary . Example 10 / 27 Viterbi HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • If conditioned on the variables in the gray area (variables with direct • A ⊥ ( U − A − π A ) | π A

  12. . Viterbi February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . Hidden Markov Models - An Example Summary . Example 11 / 27 HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345$ 348$ 346$ %&'$ !"#!$ 347$ 3466$ 3493$ ()**+$ 3493$ 3483$ ,-.)/+$ 3435$ 34:3$ 012*+$

  13. . Viterbi February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . An alternative representation of HMM Summary . Example 12 / 27 HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !" ()*# " # $ # % # & # - $"# - %$# !" - &/&0"1# ! "# ! $# ! %# ! &# +,-,*+# 3 !" /' " 1 # 3 !$ /' $ 1 # 3 !% /' % 1 # 3 !& /' & 1 # !" ' "# ' $# ' %# ' &# .-,-# 2 #

  14. . Summary February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang t q t t . t q Marginal likelihood of data in HMM 13 / 27 . Example . . . . . . . . . . . HMM . . Graphical Models Viterbi . . . . . . . . . . . . . . . . • Let λ = ( A , B , π ) • For a sequence of observation o = { o 1 , · · · , o t } , ∑ Pr ( o | λ ) = Pr ( o | q , λ ) Pr ( q | λ ) ∏ ∏ Pr ( o | q , λ ) = Pr ( o i | q i , λ ) = b q i ( o i ) i =1 i =1 ∑ Pr ( q | λ ) = π q 1 a q i q i − 1 i =2 ∑ ∏ Pr ( o | λ ) = π q 1 b q 1 ( o q 1 ) a q i q i − 1 b q i ( o q i ) i =2

  15. . Example February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . t t Forward and backward probabilities Summary . 14 / 27 . . HMM . Graphical Models . . . . . . . . . . Viterbi . . . . . . . . . . . . . . . . q + = ( q 1 , · · · , q t − 1 ) , t = ( q t +1 , · · · , q T ) q − o + = ( o 1 , · · · , o t − 1 ) , t = ( o t +1 , · · · , o T ) o − Pr ( q t = i , o | λ ) Pr ( q t = i , o | λ ) Pr ( q t = i | o , λ ) = = Pr ( o | λ ) ∑ n j =1 Pr ( q t = j , o | λ ) t , o t , o + Pr ( q t , o | λ ) = Pr ( q t , o − t | λ ) Pr ( o + = t | q t , λ ) Pr ( o − t | q t , λ ) Pr ( o t | q t , λ ) Pr ( q t | λ ) Pr ( o + = t | q t , λ ) Pr ( o − t , o t , q t | λ ) = β t ( q t ) α t ( q t ) If α t ( q t ) and β t ( q t ) is known, Pr ( q t | o , λ ) can be computed in a linear time.

  16. . Example February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang n n . DP algorithm for calculating forward probability Summary . n 15 / 27 Graphical Models . . . . Viterbi . . . . . . . . . HMM . . . . . . . . . . . . . . . . • Key idea is to use ( q t , o t ) ⊥ o − t | q t − 1 . α t ( i ) = Pr ( o 1 , · · · , o t , q t = i | λ ) ∑ = Pr ( o − t , o t , q t − 1 = j , q t = i | λ ) j =1 ∑ = Pr ( o − t , q t − 1 = j | λ ) Pr ( q t = i | q t − 1 = j , λ ) Pr ( o t | q t = i , λ ) j =1 ∑ = α t − 1 ( j ) a ij b i ( o t ) j =1 α 1 ( i ) = π i b i ( o 1 )

  17. . Viterbi February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang . Conditional dependency in forward-backward algorithms Summary . Example 16 / 27 HMM Graphical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Forward : ( q t , o t ) ⊥ o − t | q t − 1 . • Backward : o t +1 ⊥ o + t +1 | q t +1 . !" !" "#$ % " % "&$ % !" !" ! "#$% ! "% ! "&$% !" !" ' "#$% ' "% ' "&$%

  18. . Example February 15th, 2011 Biostatistics 615/815 - Lecture 12 Hyun Min Kang n n . DP algorithm for calculating backward probability Summary . n 17 / 27 Graphical Models . . . . Viterbi . . . . . . . . . HMM . . . . . . . . . . . . . . . . • Key idea is to use o t +1 ⊥ o + t +1 | q t +1 . β t ( i ) = Pr ( o t +1 , · · · , o T | q t = i , λ ) ∑ Pr ( o t +1 , o + = t +1 , q t +1 = j | q t = i , λ ) j =1 ∑ Pr ( o t +1 | q t +1 , λ ) Pr ( o + = t +1 | q t +1 = j , λ ) Pr ( q t +1 = j | q t = i , λ ) j =1 ∑ = β t +1 ( j ) a ji b j ( o t +1 ) j =1 β T ( i ) = 1

Recommend


More recommend