1
play

1 Probability Recap Reasoning over Time or Space - PDF document

Announcements CSE 473: Ar+ficial Intelligence Markov Models No class on Wed Daniel S. Weld --- University of Washington 2 [Most slides


  1. Announcements ¡ CSE ¡473: ¡Ar+ficial ¡Intelligence ¡ ¡ Markov ¡Models ¡ § No ¡class ¡on ¡Wed… ¡ Daniel ¡S. ¡Weld ¡-­‑-­‑-­‑ ¡University ¡of ¡Washington ¡ 2 [Most ¡slides ¡were ¡created ¡by ¡Dan ¡Klein ¡and ¡Pieter ¡Abbeel ¡for ¡CS188 ¡Intro ¡to ¡AI ¡at ¡UC ¡Berkeley. ¡ ¡All ¡CS188 ¡materials ¡are ¡available ¡at ¡hMp://ai.berkeley.edu.] ¡ Terminology ¡ Don’t ¡be ¡Fooled ¡ § It ¡may ¡look ¡cute… ¡ Marginal Probability ¡ Condi+onal ¡Probability ¡ Joint Probability https://fc08.deviantart.net/fs71/i/2010/258/4/4/baby_dragon__charles_by_imsorrybuti-d2yti11.png X value is given 4 Don’t ¡be ¡Fooled ¡ The ¡Sword ¡of ¡Condi+onal ¡Independence! ¡ § It ¡gets ¡big… ¡ Slay I am a BIG joint ¡ the distribution! Basilisk! P T F harrypotter.wikia.com/ Q T F T F Means: R T F T F T F T F Or, equivalently: http://img4.wikia.nocookie.net/__cb20090430175407/monster/images/9/92/Basilisk.jpg 0.1 0.05 0.2 0.07 0.03 0.05 0.1 0.3 5 6 1

  2. Probability ¡Recap ¡ Reasoning ¡over ¡Time ¡or ¡Space ¡ § Condi+onal ¡probability ¡ § O^en, ¡we ¡want ¡to ¡reason ¡about ¡a ¡sequence ¡of ¡observa+ons ¡ § Product ¡rule ¡ § Speech ¡recogni+on ¡ § Chain ¡rule ¡ ¡ § Robot ¡localiza+on ¡ ¡ § User ¡aMen+on ¡ ¡ ¡ § Medical ¡monitoring ¡ § Bayes ¡rule ¡ § Need ¡to ¡introduce ¡+me ¡(or ¡space) ¡into ¡our ¡models ¡ § X, ¡Y ¡independent ¡if ¡and ¡only ¡if: ¡ § X ¡and ¡Y ¡are ¡condi+onally ¡independent ¡given ¡Z: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡if ¡and ¡only ¡if: ¡ Markov ¡Models ¡Recap ¡ Example ¡Markov ¡Chain: ¡Weather ¡ § Explicit ¡assump+on ¡for ¡all ¡ ¡ ¡ t ¡: ¡ § States: ¡X ¡= ¡{rain, ¡sun} ¡ X t ⊥ ⊥ X 1 , . . . , X t − 2 | X t − 1 ¡ § Consequence, ¡joint ¡distribu+on ¡can ¡be ¡wriMen ¡as: ¡ ¡ P ( X 1 , X 2 , . . . , X T ) = P ( X 1 ) P ( X 2 | X 1 ) P ( X 3 | X 2 ) . . . P ( X T | X T − 1 ) § Ini+al ¡distribu+on: ¡1.0 ¡sun ¡ T Y = P ( X 1 ) P ( X t | X t − 1 ) § CPT ¡P(X t ¡| ¡X t-­‑1 ): ¡ Two ¡new ¡ways ¡of ¡represen+ng ¡the ¡same ¡CPT ¡ t =2 § Addi+onal ¡explicit ¡assump+on: ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡is ¡the ¡same ¡for ¡all ¡ t ¡ X t-­‑1 ¡ X t ¡ P(X t |X t-­‑1 ) ¡ 0.9 ¡ 0.3 ¡ 0.9 ¡ sun ¡ sun ¡ 0.9 ¡ sun ¡ sun ¡ rain ¡ sun ¡ 0.1 ¡ T-1 P ( X t | X t − 1 ) T sun ¡ rain ¡ 0.1 ¡ is the same for all t 0.3 ¡ rain ¡ sun ¡ 0.3 ¡ rain ¡ rain ¡ 0.7 ¡ rain ¡ rain ¡ 0.7 ¡ 0.7 ¡ 0.1 ¡ Example ¡Markov ¡Chain: ¡Weather ¡ Mini-­‑Forward ¡Algorithm ¡ 0.9 ¡ § Ini+al ¡distribu+on: ¡1.0 ¡sun ¡ 0.3 ¡ § Ques+on: ¡What’s ¡P(X) ¡on ¡some ¡day ¡t? ¡ rain ¡ sun ¡ X 1 X 2 X 3 X 4 0.7 ¡ 0.1 ¡ § What ¡is ¡the ¡probability ¡distribu+on ¡a^er ¡one ¡step? ¡ P ( x t ) = X P ( x t − 1 , x t ) x t − 1 X = P ( x t | x t − 1 ) P ( x t − 1 ) x t − 1 Forward simulation 2

  3. Video ¡of ¡Demo ¡Ghostbusters ¡Basic ¡Dynamics ¡ Example ¡Run ¡of ¡Mini-­‑Forward ¡Algorithm ¡ § From ¡ini+al ¡observa+on ¡of ¡sun ¡ P( X 1 ) ¡ ¡ P( X 2 ) P( X 3 ) P( X 4 ) P( X ∞ ) § From ¡ini+al ¡observa+on ¡of ¡rain ¡ P( X 1 ) P( X 2 ) P( X 3 ) P( X 4 ) P( X ∞ ) § From ¡yet ¡another ¡ini+al ¡distribu+on ¡P(X 1 ): ¡ … P( X 1 ) P( X ∞ ) [Demo: ¡L13D1,2,3] ¡ Video ¡of ¡Demo ¡Ghostbusters ¡Circular ¡Dynamics ¡ Video ¡of ¡Demo ¡Ghostbusters ¡Whirlpool ¡Dynamics ¡ Sta+onary ¡Distribu+ons ¡ Example: ¡Sta+onary ¡Distribu+ons ¡ § Ques+on: ¡What’s ¡P(X) ¡at ¡+me ¡t ¡= ¡infinity? ¡ § For ¡most ¡chains: ¡ § Sta+onary ¡distribu+on: ¡ § Influence ¡of ¡the ¡ini+al ¡distribu+on ¡ § The ¡distribu+on ¡we ¡end ¡up ¡with ¡is ¡called ¡ X 1 X 2 X 3 X 4 gets ¡less ¡and ¡less ¡over ¡+me. ¡ the ¡sta+onary ¡distribu+on ¡ ¡ ¡ of ¡the ¡ P ∞ chain ¡ § The ¡distribu+on ¡we ¡end ¡up ¡in ¡is ¡ P ∞ ( sun ) = P ( sun | sun ) P ∞ ( sun ) + P ( sun | rain ) P ∞ ( rain ) independent ¡of ¡the ¡ini+al ¡distribu+on ¡ § It ¡sa+sfies ¡ P ∞ ( rain ) = P ( rain | sun ) P ∞ ( sun ) + P ( rain | rain ) P ∞ ( rain ) X P ∞ ( X ) = P ∞ +1 ( X ) = P ( X | x ) P ∞ ( x ) P ∞ ( sun ) = 0 . 9 P ∞ ( sun ) + 0 . 3 P ∞ ( rain ) X t-­‑1 ¡ X t ¡ P(X t |X t-­‑1 ) ¡ x P ∞ ( rain ) = 0 . 1 P ∞ ( sun ) + 0 . 7 P ∞ ( rain ) sun ¡ sun ¡ 0.9 ¡ sun ¡ rain ¡ 0.1 ¡ P ∞ ( sun ) = 3 P ∞ ( rain ) rain ¡ sun ¡ 0.3 ¡ P ∞ ( rain ) = 1 / 3 P ∞ ( sun ) P ∞ ( sun ) = 3 / 4 rain ¡ rain ¡ 0.7 ¡ Also: ¡ P ∞ ( rain ) = 1 / 4 P ∞ ( sun ) + P ∞ ( rain ) = 1 3

  4. Hidden ¡Markov ¡Models ¡ Applica+on ¡of ¡Sta+onary ¡Distribu+on: ¡Web ¡Link ¡Analysis ¡ § PageRank ¡over ¡a ¡web ¡graph ¡ § Markov ¡chains ¡not ¡so ¡useful ¡for ¡most ¡agents ¡ § Each ¡web ¡page ¡is ¡a ¡state ¡ § Eventually ¡you ¡don’t ¡know ¡anything ¡anymore ¡ § Ini+al ¡distribu+on: ¡uniform ¡over ¡pages ¡ § Need ¡observa+ons ¡to ¡update ¡your ¡beliefs ¡ § Transi+ons: ¡ § Hidden ¡Markov ¡models ¡(HMMs) ¡ § With ¡prob. ¡c, ¡uniform ¡jump ¡to ¡a ¡ ¡random ¡page ¡(doMed ¡lines, ¡not ¡all ¡shown) ¡ § Underlying ¡Markov ¡chain ¡over ¡states ¡S ¡ § With ¡prob. ¡1-­‑c, ¡follow ¡a ¡random ¡ § You ¡observe ¡outputs ¡(effects) ¡at ¡each ¡+me ¡step ¡ ¡outlink ¡(solid ¡lines) ¡ § As ¡a ¡Bayes’ ¡net: ¡ § Sta+onary ¡distribu+on ¡ § Will ¡spend ¡more ¡+me ¡on ¡highly ¡reachable ¡pages ¡ § E.g. ¡many ¡ways ¡to ¡get ¡to ¡the ¡Acrobat ¡Reader ¡download ¡page ¡ X 1 X 2 X 3 X 4 X N X 5 § Somewhat ¡robust ¡to ¡link ¡spam ¡ § Google ¡1.0 ¡returned ¡the ¡set ¡of ¡pages ¡containing ¡all ¡your ¡ keywords ¡in ¡decreasing ¡rank, ¡now ¡all ¡search ¡engines ¡use ¡link ¡ analysis ¡along ¡with ¡many ¡other ¡factors ¡(rank ¡actually ¡gerng ¡ E 1 E 2 E 3 E 4 E N E 5 less ¡important ¡over ¡+me) ¡ Example ¡ Hidden ¡Markov ¡Models ¡ X 1 X 2 X 3 X 4 X N X 5 E 1 E 2 E 3 E 4 E N E 5 § Defines ¡a ¡joint ¡probability ¡distribu+on: ¡ § An ¡HMM ¡is ¡defined ¡by: ¡ § Ini+al ¡distribu+on: ¡ § Transi+ons: ¡ § Emissions: ¡ Ghostbusters ¡HMM ¡ HMM ¡Computa+ons ¡ § P(X 1 ) ¡= ¡uniform ¡ 1/9 1/9 1/9 § Given ¡ ¡ § P(X’|X) ¡= ¡ghosts ¡usually ¡move ¡clockwise, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ 1/9 1/9 1/9 § parameters ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡but ¡some+mes ¡move ¡in ¡a ¡random ¡direc+on ¡or ¡stay ¡put ¡ 1/9 1/9 1/9 § P(E|X) ¡= ¡same ¡sensor ¡model ¡as ¡before: ¡ § evidence E 1:n =e 1:n red ¡means ¡close, ¡green ¡means ¡far ¡away. ¡ P(X 1 ) § Inference problems include: 1/6 1/6 1/2 X 1 X 2 X 3 X 4 § Filtering, find P(X t |e 1:t ) for all t 0 1/6 0 Etc … § Smoothing, find P(X t |e 1:n ) for all t 0 0 0 E 1 E 1 E 3 E 4 § Most probable explanation, find P(X’|X=<1,2>) x* 1:n = argmax x 1:n P(x 1:n |e 1:n ) P(red | 3) P(orange | 3) P(yellow | 3) P(green | 3) E 5 P(E|X) 0.05 0.15 0.5 0.3 Etc … (must specify for other distances) 4

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