hidden markov models ch 15 announcements
play

Hidden Markov Models (Ch. 15) Announcements Homework 2 posted - PowerPoint PPT Presentation

Hidden Markov Models (Ch. 15) Announcements Homework 2 posted Programing: -Python (preferred) -Java -Matlab Markov... chains? Recap, Markov property: (Next state only depends on current state) pick B pick C c c c a a a b d


  1. Hidden Markov Models (Ch. 15)

  2. Announcements Homework 2 posted Programing: -Python (preferred) -Java -Matlab

  3. Markov... chains? Recap, Markov property: (Next state only depends on current state) pick B pick C ¬c ¬c ¬c a a a b d ¬b d ¬b d x 0 x 1 x 2 For Gibbs sampling, we made a lot of samples using the Markov property (since this is 1-dimension, it looks like a “chain”)

  4. Markov... chains? For the next bit, we will still have a “Markov” and uncertainty (i.e. probabilities) However, we will add partial-observability (some things we cannot see) These are often called Hidden Markov Models (not “chains” because they won’t be 1D... w/e)

  5. Hidden Markov Models For Hidden Markov Models (HMMs) often: (1) E = the evidence (2) X = the hidden/not observable part We assume the hidden information is what causes the evidence (otherwise quite easy) x 0 x 1 x 2 x 3 x 4 ... We only e 1 e 2 e 3 e 4 know these

  6. Hidden Markov Models If you squint a bit, this is actually a Bayesian network as well (though can go on for a while) x 0 x 1 x 2 x 3 x 4 ... P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 e 2 e 3 e 4 P(x t+1 |¬x t ) 0.9 For simplicity’s sake, we will assume the probabilities of going to the right (next state) and down (seeing evidence) are the same for all subscripts (typically “time”)

  7. Hidden Markov Models Our example will be: sleep deprivation So variable X t will be if a person got enough sleep on day t This person is not you, but you see them every day, and you can tell if their eyes are bloodshot (this is E t )

  8. Hidden Markov Models As we will be dealing with quite a few variables, we will introduce some notation: E 1:t = E 1 , E 2 , E 3 , .... E t (similarly for X 0:t ) So P(E 1:t ) = P(E 1 , E 2 , E 3 , .. E t ), which is normal definition of commas like P(a,b) We will assume we only know E 1:t (and X 0 ) and want to figure out X k for various k

  9. Hidden Markov Models Quick Bayesian network recap: c a b d Used fact tons in our sampling...

  10. Hidden Markov Models x 0 x 1 x 2 x 3 x 4 ... P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 e 2 e 3 e 4 P(x t+1 |¬x t ) 0.9 So in this Bayesian network (bigger): Most Likely Explanation Typically, use above to compute four things: Filtering Prediction Smoothing MLE

  11. Filtering in HMMs All four of these are actually quite similar, and you can probably already find them The only difficulty is the size of the Bayesian network, so let’s start small to get intuition: How can you find P(x 1 |¬e 1 )? P(x 0 ) 0.5 x 0 x 1 (this is a simple Bays-net) P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 P(x t+1 |¬x t ) 0.9

  12. Filtering in HMMs P(x 0 ) 0.5 x 0 x 1 P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 P(x t+1 |¬x t ) 0.9 Similarly, P(¬x 1 |¬e 1 ) ≈0.05α So normalized gives: P(x 1 |¬e 1 ) ≈ 0.913 91% chance I slept last night, given today I didn’t have bloodshot eyes

  13. Filtering in HMMs P(x 0 ) 0.5 x 0 x 1 x 2 P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 e 2 P(x t+1 |¬x t ) 0.9 Find: P(x 2 |¬e 1 ,¬e 2 )

  14. Filtering in HMMs Double sum?!?! Double... for loop..? Just computed this! It is P(x 1 |e 1 ) ... after normalizing you should get: ≈0.854

  15. Filtering in HMMs Double sum?!?! Double... for loop..? Just computed this! It is P(x 1 |e 1 ) change to ¬x 2 P(¬x 2 |¬e 1 ,¬e 2 ) ≈0.075α ... after normalizing you should get: ≈0.854

  16. Filtering in HMMs In general:

  17. Filtering in HMMs In general: ... same, but different ‘t’

  18. Filtering in HMMs In general: Actually, this is just a recursive function

  19. Filtering in HMMs So we can compute f(t) = P(x t |e 1:t ): actually an array, as you need both T/F for sum(or 1-) Of course, we don’t actually want to do this recursively... rather with dynamic programing Start with f(0) = P(x 0 ), then use this to find f(1)... and so on (can either store in array, or just have a single variable... like Fibonacci)

  20. Prediction in HMMs Filtering Prediction Smoothing Most likely- explanation How would you find “prediction”?

  21. Prediction in HMMs Probably best to go back to the example: What is chance I sleep on day 3 given, you saw me without bloodshot eyes on day 1&2? P(x 0 ) 0.5 x 0 x 1 x 2 x 3 P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 e 2 P(x t+1 |¬x t ) 0.9 P(x 3 | e 1 , e 2 )=???

  22. Prediction in HMMs whew... Turns out that P(¬x 3 |¬e 1 ,¬e 2 ) ≈ 0.356α, so α=1

  23. Prediction in HMMs Day 4? P(x 0 ) 0.5 x 0 x 1 x 2 x 3 x 4 P(e t |x t ) 0.3 P(x t+1 |x t ) 0.6 P(e t |¬x t ) 0.8 e 1 e 2 P(x t+1 |¬x t ) 0.9 P(x 4 | e 1 , e 2 )=???

  24. Prediction in HMMs ...think I see a pattern here Turns out that P(¬x 4 |¬e 1 ,¬e 2 ) ≈ 0.293α, so α=1 (α always 1 now, as can move into red box)

  25. Prediction in HMMs Filtering Prediction Smoothing Most likely- explanation We’ll save the other two for next time...

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend