Warm-up as you walk in Each node in a Bayes net represents a conditional probability distribution. What distribution do you get when you multiply all of.

Slides:



Advertisements
Similar presentations
Bayesian networks Chapter 14 Section 1 – 2. Outline Syntax Semantics Exact computation.
Advertisements

Identifying Conditional Independencies in Bayes Nets Lecture 4.
Bayesian Networks VISA Hyoungjune Yi. BN – Intro. Introduced by Pearl (1986 ) Resembles human reasoning Causal relationship Decision support system/ Expert.
Bayesian Networks Chapter 14 Section 1, 2, 4. Bayesian networks A simple, graphical notation for conditional independence assertions and hence for compact.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) March, 16, 2009.
3/19. Conditional Independence Assertions We write X || Y | Z to say that the set of variables X is conditionally independent of the set of variables.
Bayesian networks Chapter 14 Section 1 – 2.
Bayesian Belief Networks
CS 188: Artificial Intelligence Fall 2009 Lecture 15: Bayes’ Nets II – Independence 10/15/2009 Dan Klein – UC Berkeley.
CS 188: Artificial Intelligence Spring 2009 Lecture 15: Bayes’ Nets II -- Independence 3/10/2009 John DeNero – UC Berkeley Slides adapted from Dan Klein.
CS 188: Artificial Intelligence Fall 2009 Lecture 14: Bayes’ Nets 10/13/2009 Dan Klein – UC Berkeley.
1 Bayesian Networks Chapter ; 14.4 CS 63 Adapted from slides by Tim Finin and Marie desJardins. Some material borrowed from Lise Getoor.
Bayes’ Nets [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at
Advanced Artificial Intelligence
Announcements  Midterm 1  Graded midterms available on pandagrader  See Piazza for post on how fire alarm is handled  Project 4: Ghostbusters  Due.
Artificial Intelligence CS 165A Tuesday, November 27, 2007  Probabilistic Reasoning (Ch 14)
Bayes’ Nets  A Bayes’ net is an efficient encoding of a probabilistic model of a domain  Questions we can ask:  Inference: given a fixed BN, what is.
Bayesian Networks Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell,
CSE 473: Artificial Intelligence Spring 2012 Bayesian Networks Dan Weld Many slides adapted from Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer.
Probabilistic Models  Models describe how (a portion of) the world works  Models are always simplifications  May not account for every variable  May.
Introduction to Bayesian Networks
QUIZ!!  T/F: Traffic, Umbrella are cond. independent given raining. TRUE  T/F: Fire, Smoke are cond. Independent given alarm. FALSE  T/F: BNs encode.
Announcements Project 4: Ghostbusters Homework 7
Probabilistic Reasoning [Ch. 14] Bayes Networks – Part 1 ◦Syntax ◦Semantics ◦Parameterized distributions Inference – Part2 ◦Exact inference by enumeration.
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
Conditional Independence As with absolute independence, the equivalent forms of X and Y being conditionally independent given Z can also be used: P(X|Y,
PROBABILISTIC REASONING Heng Ji 04/05, 04/08, 2016.
Chapter 12. Probability Reasoning Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
CS 2750: Machine Learning Bayesian Networks Prof. Adriana Kovashka University of Pittsburgh March 14, 2016.
Artificial Intelligence Bayes’ Nets: Independence Instructors: David Suter and Qince Li Course Harbin Institute of Technology [Many slides.
Another look at Bayesian inference
Reasoning Under Uncertainty: Belief Networks
CS 188: Artificial Intelligence Spring 2007
CS 2750: Machine Learning Directed Graphical Models
Bayesian Networks Chapter 14 Section 1, 2, 4.
Bayesian networks Chapter 14 Section 1 – 2.
Presented By S.Yamuna AP/CSE
Qian Liu CSE spring University of Pennsylvania
Bayesian networks (1) Lirong Xia Spring Bayesian networks (1) Lirong Xia Spring 2017.
Read R&N Ch Next lecture: Read R&N
Introduction to Artificial Intelligence
Probabilistic Models Models describe how (a portion of) the world works Models are always simplifications May not account for every variable May not account.
CS 4/527: Artificial Intelligence
CS 4/527: Artificial Intelligence
CS 4/527: Artificial Intelligence
Introduction to Artificial Intelligence
Read R&N Ch Next lecture: Read R&N
Probabilistic Reasoning; Network-based reasoning
Structure and Semantics of BN
CS 188: Artificial Intelligence
Instructors: Fei Fang (This Lecture) and Dave Touretzky
CAP 5636 – Advanced Artificial Intelligence
CSE 473: Artificial Intelligence Autumn 2011
CS 188: Artificial Intelligence
CS 188: Artificial Intelligence Fall 2007
CS 188: Artificial Intelligence Fall 2008
CAP 5636 – Advanced Artificial Intelligence
CS 188: Artificial Intelligence
Announcements Midterm: Wednesday 7pm-9pm
CS 188: Artificial Intelligence Spring 2007
Structure and Semantics of BN
Read R&N Ch Next lecture: Read R&N
Bayesian networks Chapter 14 Section 1 – 2.
Probabilistic Reasoning
CS 188: Artificial Intelligence Spring 2006
Read R&N Ch Next lecture: Read R&N
Probabilistic Reasoning
Bayesian networks (1) Lirong Xia. Bayesian networks (1) Lirong Xia.
CS 188: Artificial Intelligence Fall 2008
Presentation transcript:

Warm-up as you walk in Each node in a Bayes net represents a conditional probability distribution. What distribution do you get when you multiply all of these conditional probabilities together? 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐷 𝐶 𝑃(𝐸|𝐶)

Announcements Midterm: Mon 4/8, in-class See Piazza for details Course survey: Thanks! A few notes In-class polls Lectures Recitation TAs Beyond Pac-man/Gridworld

AI: Representation and Problem Solving Bayes Nets Independence Instructors: Pat Virtue & Stephanie Rosenthal Slide credits: CMU AI and http://ai.berkeley.edu

Piazza Poll 1 Each node in a Bayes net represents a conditional probability distribution. What distribution do you get when you multiply all of these conditional probabilities together? Marginal Conditional Joint Poisson 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐷 𝐶 𝑃(𝐸|𝐶)

Piazza Poll 1 Each node in a Bayes net represents a conditional probability distribution. What distribution do you get when you multiply all of these conditional probabilities together? Marginal Conditional Joint Poisson 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐷 𝐶 𝑃(𝐸|𝐶)

Answer Any Query from Condition Probability Tables Bayes Net Joint Query 𝑃 𝑎 𝑒) 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐷 𝐶 𝑃(𝐸|𝐶)

Bayes Net Independence Assumptions CPTs to Joint Chain rule Bayes net model Causality (or not) Markov assumptions 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐷 𝐶 𝑃(𝐸|𝐶) 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴,𝐵 𝑃 𝐷 𝐴,𝐵,𝐶 𝑃(𝐸|𝐴, 𝐵,𝐶,𝐷)

Bayes Nets Representation One node per random variable DAG One CPT per node: P(node | Parents(node) ) Encodes joint distribution as product of conditional distributions on each variable 𝑃 𝑋 1 ,…, 𝑋 𝑁 = 𝑖 𝑃 𝑋 𝑖 𝑃𝑎𝑟𝑒𝑛𝑡𝑠( 𝑋 𝑖 )) Bayes net 𝐴 𝐵 𝐶 𝐷 𝐸

Piazza Poll 2 I. II. III. Match the product of CPTs to the Bayes net. 𝐴 𝐵 𝐶 𝐴 𝐵 𝐶 𝐴 𝐵 𝐶 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐵 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐴 𝑃 𝐵 𝑃 𝐶 𝐴, 𝐵 𝑃 𝐴 𝑃 𝐵 𝑃 𝐶 𝐴, 𝐵 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐵 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐴 𝑃 𝐵 𝑃 𝐶 𝐴, 𝐵 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐵

Bayes Nets in the Wild Wheel of Fortune

Example: Speech Recognition “artificial ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅” Bayes Nets in the Wild Example: Speech Recognition “artificial ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅” Find most probable next word given “artificial” and the audio for second word.

Example: Speech Recognition “artificial ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅” Bayes Nets in the Wild Example: Speech Recognition “artificial ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅” Find most probable next word given “artificial” and the audio for second word. Which second word gives the highest probability? 𝑃 𝐥𝐢𝐦𝐛 artificial, audio) 𝑃 𝐢𝐧𝐭𝐞𝐥𝐥𝐢𝐠𝐞𝐧𝐜𝐞 artificial, audio) 𝑃 𝐟𝐥𝐚𝐯𝐨𝐫𝐢𝐧𝐠 artificial, audio) Break down problem n-gram probability * audio probability 𝑃 𝐥𝐢𝐦𝐛 artificial) * 𝑃(audio∣𝐥𝐢𝐦𝐛) 𝑃 𝐢𝐧𝐭𝐞𝐥𝐥𝐢𝐠𝐞𝐧𝐜𝐞 artificial) *𝑃(audio∣𝐢𝐧𝐭𝐞𝐥𝐥𝐢𝐠𝐞𝐧𝐜𝐞) 𝑃 𝐟𝐥𝐚𝐯𝐨𝐫𝐢𝐧𝐠 artificial) *𝑃(audio∣𝐟𝐥𝐚𝐯𝐨𝐫𝐢𝐧𝐠)

Bayes Nets in the Wild 𝑠𝑒𝑐𝑜𝑛 𝑑 ∗ = argmax 𝒔𝒆𝒄𝒐𝒏𝒅 𝑃 𝒔𝒆𝒄𝒐𝒏𝒅 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙, 𝑎𝑢𝑑𝑖𝑜) = argmax 𝒔𝒆𝒄𝒐𝒏𝒅 𝑃(𝒔𝒆𝒄𝒐𝒏𝒅, 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙, 𝑎𝑢𝑑𝑖𝑜) 𝑃(𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙, 𝑎𝑢𝑑𝑖𝑜) = argmax 𝒔𝒆𝒄𝒐𝒏𝒅 𝑃(𝒔𝒆𝒄𝒐𝒏𝒅, 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙, 𝑎𝑢𝑑𝑖𝑜) = argmax 𝒔𝒆𝒄𝒐𝒏𝒅 𝑃 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑃 𝒔𝒆𝒄𝒐𝒏𝒅 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑃(𝑎𝑢𝑑𝑖𝑜∣𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙, 𝒔𝒆𝒄𝒐𝒏𝒅) = argmax 𝒔𝒆𝒄𝒐𝒏𝒅 𝑃 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑃 𝒔𝒆𝒄𝒐𝒏𝒅 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑃(𝑎𝑢𝑑𝑖𝑜∣𝒔𝒆𝒄𝒐𝒏𝒅) = argmax 𝒔𝒆𝒄𝒐𝒏𝒅 𝑃 𝒔𝒆𝒄𝒐𝒏𝒅 𝑎𝑟𝑡𝑖𝑓𝑖𝑐𝑖𝑎𝑙 𝑃 𝑎𝑢𝑑𝑖𝑜 𝒔𝒆𝒄𝒐𝒏𝒅 n-gram probability * audio probability

Conditional Independence Semantics For the following Bayes nets, write the joint 𝑃(𝐴,𝐵,𝐶) Using the chain rule (with top-down order A,B,C) Using Bayes net semantics (product of CPTs) 𝐴 𝐵 𝐶 𝐴 𝐵 𝐶 𝐴 𝐵 𝐶 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴,𝐵 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐵 Assumption: 𝑃 𝐶 𝐴,𝐵 =𝑃(𝐶|𝐵) C is independent from A given B 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴,𝐵 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 Assumption: 𝑃 𝐶 𝐴,𝐵 =𝑃(𝐶|𝐴) C is independent from B given A 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴,𝐵 𝑃 𝐴 𝑃 𝐵 𝑃 𝐶 𝐴, 𝐵 Assumption: 𝑃 𝐵 𝐴 =𝑃(𝐵) A is independent from B given { }

Causal Chains This configuration is a “causal chain” Guaranteed X independent of Z ? No! One example set of CPTs for which X is not independent of Z is sufficient to show this independence is not guaranteed. Example: Low pressure causes rain causes traffic, high pressure causes no rain causes no traffic In numbers: P( +y | +x ) = 1, P( -y | - x ) = 1, P( +z | +y ) = 1, P( -z | -y ) = 1 X: Low pressure Y: Rain Z: Traffic

Causal Chains This configuration is a “causal chain” Guaranteed X independent of Z given Y? Evidence along the chain “blocks” the influence X: Low pressure Y: Rain Z: Traffic Yes!

Common Cause This configuration is a “common cause” Guaranteed X independent of Z ? No! One example set of CPTs for which X is not independent of Z is sufficient to show this independence is not guaranteed. Example: Project due causes both forums busy and lab full In numbers: P( +x | +y ) = 1, P( -x | -y ) = 1, P( +z | +y ) = 1, P( -z | -y ) = 1 Y: Project due X: Forums busy Z: Lab full

Common Cause This configuration is a “common cause” Guaranteed X and Z independent given Y? Observing the cause blocks influence between effects. Y: Project due X: Forums busy Z: Lab full Yes!

Common Effect Last configuration: two causes of one effect (v-structures) Are X and Y independent? Yes: the ballgame and the rain cause traffic, but they are not correlated Still need to prove they must be (try it!) Are X and Y independent given Z? No: seeing traffic puts the rain and the ballgame in competition as explanation. This is backwards from the other cases Observing an effect activates influence between possible causes. X: Raining Y: Ballgame Z: Traffic

Practice Consider the case where you show up to Claire’s office hours and she isn’t there Draw a Bayes Net capturing the causal relationship between Claire being in the room (yes/no), Claire being abducted by aliens (yes/no), and your watch having the wrong time (yes/no) What statements about independence can you make?

Conditional Independence Semantics Every variable is conditionally independent of its non-descendants given its parents

Markov blanket A variable’s Markov blanket consists of parents, children, children’s other parents Every variable is conditionally independent of all other variables given its Markov blanket

Markov Structures

Answer Any Query from Condition Probability Tables Bayes Net Joint Query 𝑃 𝑎 𝑒) 𝑃 𝐴 𝑃 𝐵 𝐴 𝑃 𝐶 𝐴 𝑃 𝐷 𝐶 𝑃(𝐸|𝐶)

Example: Alarm Network Variables B: Burglary A: Alarm goes off M: Mary calls J: John calls E: Earthquake!

Example: Alarm Network Joint distribution factorization example Generic chain rule 𝑃 𝑋 1 … 𝑋 2 = 𝑖 𝑃 𝑋 𝑖 𝑋 1 … 𝑋 𝑖−1 ) 𝑃 𝐵,𝐸,𝐴,𝐽,𝑀 =𝑃 𝐵 𝑃 𝐸 𝐵 𝑃 𝐴 𝐵,𝐸 𝑃 𝐽 𝐵,𝐸,𝐴 𝑃(𝑀|𝐵,𝐸,𝐴,𝐽) 𝑃 𝐵,𝐸,𝐴,𝐽,𝑀 =𝑃 𝐵 𝑃 𝐸 𝑃 𝐴 𝐵,𝐸 𝑃 𝐽 𝐴 𝑃(𝑀|𝐴) Bayes nets 𝑃 𝑋 1 … 𝑋 2 = 𝑖 𝑃 𝑋 𝑖 𝑃𝑎𝑟𝑒𝑛𝑡𝑠( 𝑋 𝑖 )) Burglary Earthquake Alarm John calls Mary calls

Example: Alarm Network P(E) +e 0.002 -e 0.998 B P(B) +b 0.001 -b 0.999 Burglary Earthqk Alarm B E A P(A|B,E) +b +e +a 0.95 -a 0.05 -e 0.94 0.06 -b 0.29 0.71 0.001 0.999 John calls Mary calls demo A J P(J|A) +a +j 0.9 -j 0.1 -a 0.05 0.95 A M P(M|A) +a +m 0.7 -m 0.3 -a 0.01 0.99