Artificial Intelligence CS 165A Thursday, November 29, 2007  Probabilistic Reasoning / Bayesian networks (Ch 14)

Slides:



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

BAYESIAN NETWORKS Ivan Bratko Faculty of Computer and Information Sc. University of Ljubljana.
Probabilistic models Jouni Tuomisto THL. Outline Deterministic models with probabilistic parameters Hierarchical Bayesian models Bayesian belief nets.
Probabilistic Reasoning Bayesian Belief Networks Constructing Bayesian Networks Representing Conditional Distributions Summary.
Bayesian Networks CSE 473. © Daniel S. Weld 2 Last Time Basic notions Atomic events Probabilities Joint distribution Inference by enumeration Independence.
Artificial Intelligence Universitatea Politehnica Bucuresti Adina Magda Florea
Lirong Xia Bayesian networks (2) Thursday, Feb 25, 2014.
Reasoning Under Uncertainty: Bayesian networks intro Jim Little Uncertainty 4 November 7, 2014 Textbook §6.3, 6.3.1, 6.5, 6.5.1,
1 Knowledge Engineering for Bayesian Networks. 2 Probability theory for representing uncertainty l Assigns a numerical degree of belief between 0 and.
Identifying Conditional Independencies in Bayes Nets Lecture 4.
For Monday Read chapter 18, sections 1-2 Homework: –Chapter 14, exercise 8 a-d.
Bayesian Networks CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
For Monday Finish chapter 14 Homework: –Chapter 13, exercises 8, 15.
Bayesian Networks VISA Hyoungjune Yi. BN – Intro. Introduced by Pearl (1986 ) Resembles human reasoning Causal relationship Decision support system/ Expert.
1 22c:145 Artificial Intelligence Bayesian Networks Reading: Ch 14. Russell & Norvig.
Bayesian Networks Chapter 14 Section 1, 2, 4. Bayesian networks A simple, graphical notation for conditional independence assertions and hence for compact.
Introduction of Probabilistic Reasoning and Bayesian Networks
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.
Review: Bayesian learning and inference
Probabilistic Reasoning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 14 (14.1, 14.2, 14.3, 14.4) Capturing uncertain knowledge Probabilistic.
PGM 2003/04 Tirgul 3-4 The Bayesian Network Representation.
Bayesian networks Chapter 14 Section 1 – 2.
Bayesian Belief Networks
. DAGs, I-Maps, Factorization, d-Separation, Minimal I-Maps, Bayesian Networks Slides by Nir Friedman.
1 Bayesian Networks Chapter ; 14.4 CS 63 Adapted from slides by Tim Finin and Marie desJardins. Some material borrowed from Lise Getoor.
Bayesian networks More commonly called graphical models A way to depict conditional independence relationships between random variables A compact specification.
Quiz 4: Mean: 7.0/8.0 (= 88%) Median: 7.5/8.0 (= 94%)
Advanced Artificial Intelligence
CPS 270: Artificial Intelligence Bayesian networks Instructor: Vincent Conitzer.
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.
Made by: Maor Levy, Temple University  Probability expresses uncertainty.  Pervasive in all of Artificial Intelligence  Machine learning 
1 CS 343: Artificial Intelligence Bayesian Networks Raymond J. Mooney University of Texas at Austin.
Machine Learning CS 165B Spring Course outline Introduction (Ch. 1) Concept learning (Ch. 2) Decision trees (Ch. 3) Ensemble learning Neural Networks.
Bayesian Belief Networks. What does it mean for two variables to be independent? Consider a multidimensional distribution p(x). If for two features we.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes March 13, 2012.
Probabilistic Belief States and Bayesian Networks (Where we exploit the sparseness of direct interactions among components of a world) R&N: Chap. 14, Sect.
Bayesian networks. Motivation We saw that the full joint probability can be used to answer any question about the domain, but can become intractable as.
1 Chapter 14 Probabilistic Reasoning. 2 Outline Syntax of Bayesian networks Semantics of Bayesian networks Efficient representation of conditional distributions.
For Wednesday Read Chapter 11, sections 1-2 Program 2 due.
2 Syntax of Bayesian networks Semantics of Bayesian networks Efficient representation of conditional distributions Exact inference by enumeration Exact.
1 Monte Carlo Artificial Intelligence: Bayesian Networks.
Introduction to Bayesian Networks
Announcements Project 4: Ghostbusters Homework 7
Probabilistic Reasoning [Ch. 14] Bayes Networks – Part 1 ◦Syntax ◦Semantics ◦Parameterized distributions Inference – Part2 ◦Exact inference by enumeration.
Marginalization & Conditioning Marginalization (summing out): for any sets of variables Y and Z: Conditioning(variant of marginalization):
Review: Bayesian inference  A general scenario:  Query variables: X  Evidence (observed) variables and their values: E = e  Unobserved variables: Y.
Bayesian networks and their application in circuit reliability estimation Erin Taylor.
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
1 Probability FOL fails for a domain due to: –Laziness: too much to list the complete set of rules, too hard to use the enormous rules that result –Theoretical.
Reasoning Under Uncertainty: Independence and Inference CPSC 322 – Uncertainty 5 Textbook §6.3.1 (and for HMMs) March 25, 2011.
Belief Networks Kostas Kontogiannis E&CE 457. Belief Networks A belief network is a graph in which the following holds: –A set of random variables makes.
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,
Belief Networks CS121 – Winter Other Names Bayesian networks Probabilistic networks Causal networks.
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.
CS 2750: Machine Learning Review
CS 2750: Machine Learning Directed Graphical Models
Read R&N Ch Next lecture: Read R&N
Bayesian Networks Probability In AI.
Read R&N Ch Next lecture: Read R&N
Class #16 – Tuesday, October 26
Hankz Hankui Zhuo Bayesian Networks Hankz Hankui Zhuo
CPS 570: Artificial Intelligence Bayesian networks
Belief Networks CS121 – Winter 2003 Belief Networks.
Instructor: Vincent Conitzer
Probabilistic Reasoning
Read R&N Ch Next lecture: Read R&N
Presentation transcript:

Artificial Intelligence CS 165A Thursday, November 29, 2007  Probabilistic Reasoning / Bayesian networks (Ch 14)

2 Notes Note the reading assignments for next week

3 Belief nets General assumptions –A DAG is a reasonable representation of the influences among the variables  Leaves of the DAG have no direct influence on other variables –Conditional independences cause the graph to be much less than fully connected (the system is locally structured, or sparse) –The CPTs are relatively easy to state  Many can be estimated as a canonical distribution (a standard pattern – just specify the parameters) or as a deterministic node (direct function – logical or numerical combination – of parents)

4 What are belief nets for? Given the structure, we can now pose queries: –Typically: P(Query | Evidence) or P(Cause | Symptoms) –P(X 1 | X 4, X 5 ) –P(Earthquake | JohnCalls) –P(Burglary | JohnCalls,  MaryCalls) Query variable Evidence variables This is very similar to: –T ELL (KB, JohnCalls,  MaryCalls) –A SK (KB, Burglary) Or agent view: P(state of world | percepts) leads to choice of action

5 X Y P(X) P(Y|X) A SK P(X|Y) RainingWet grass X Y P(X) P(Y|X) Z P(Z|Y) A SK P(X|Z) Rained Wet grass Worm sighting

6 Thursday Quiz 1.What is the joint probability distribution of the random variables described by this belief net? –I.e., what is P(U, V, W, X, Y, Z)? 2.Variables W and X are a)Independent b)Independent given U c)Independent given Y (choose one) 3.If you know the CPTs, is it possible to compute P(Z | U)? U X V W ZY

7 Review U X V W ZY P(V) P(X|U,V) P(U) P(W|U) P(Z|X)P(Y|W,X) Given this Bayesian network: 1.What are the CPTs? 2.What is the joint probability distribution of all the variables? 3.How would we calculate P(X | W, Y, Z)? P(U,V,W,X,Y,Z) = product of the CPTs = P(U) P(V) P(W|U) P(X|U,V) P(Y|W,X) P(Z|X)

8 How to construct a belief net Choose the random variables that describe the domain –These will be the nodes of the graph Choose a left-to-right ordering of the variables that indicates a general order of influence –“Root causes” to the left, symptoms to the right X1X1 X2X2 X3X3 X4X4 X5X5 CausesSymptoms

9 How to construct a belief net (cont.) Draw arcs from left to right to indicate “direct influence” (causality) among variables –May have to reorder some nodes X1X1 X2X2 X3X3 X4X4 X5X5 Define the conditional probability table (CPT) for each node –P(node | parents) P(X 1 ) P(X 2 ) P(X 3 | X 1,X 2 ) P(X 4 | X 2,X 3 ) P(X 5 | X 4 )

10 How to construct a belief net (cont.) To calculate any probability from the full joint distribution, use (1) definition of conditional probability and (2) marginalization –P(red vars | green vars) = ? (ignoring the blue vars) Joint PD Marginalization

11 Example: Flu and measles Flu MeaslesFever Spots P(Flu)P(Measles)P(Spots | Measles) P(Fever | Flu, Measles) To create the belief net: Choose variables (evidence and query) Choose an ordering and create links (direct influences) Fill in probabilities (CPTs)

12 Example: Flu and measles Flu MeaslesFever Spots P(Flu) = 0.01 P(Measles) = P(Flu) P(Measles) P(Spots | Measles) P(Fever | Flu, Measles) P(Spots | Measles) = [0, 0.9] P(Fever | Flu, Measles) = [0.01, 0.8, 0.9, 1.0] Compute P(Flu | Fever) and P(Flu | Fever, Spots). Are they equivalent? CPTs:

13 Conditional Independence Can we determine conditional independence of variables directly from the graph? A set of nodes X is independent of another set of nodes Y, given a set of (evidence) nodes E, if every path from X to Y is d-separated, or blocked, by E 3 ways to block paths from X to Y, given E The set of nodes E d-separates sets X and Y

14 Examples XZY X ind. of Y? X ind. of Y given Z? X Z Y XZY XZY XZY

15 Independence (again) Variables X and Y are independent if and only if –P(X, Y) = P(X) P(Y) –P(X | Y) = P(X) –P(Y | X) = P(Y) We can determine independence of variables in a belief net directly from the graph –Variables X and Y are independent if they share no common ancestry  I.e., the set of { X, parents of X, grandparents of X, … } has a null intersection with the set of {Y, parents of Y, grandparents of Y, … } XY X, Y dependent

16 Conditional Independence X and Y are (conditionally) independent given E iff –P(X | Y, E) = P(X | E) –P(Y | X, E) = P(Y | E) {X 1,…,X n } and {Y 1,…,Y m } are conditionally independent given {E 1,…,E k } iff –P(X 1,…,X n | Y 1, …, Y m, E 1, …,E k ) = P(X 1,…,X n | E 1, …,E k ) –P(Y 1, …, Y m | X 1,…,X n, E 1, …,E k ) = P(Y 1, …, Y m | E 1, …,E k ) We can determine conditional independence of variables (and sets of variables) in a belief net directly from the graph

17 How to determine conditional independence A set of nodes X is independent of another set of nodes Y, given a set of (evidence) nodes E, if every path from X i to Y j is d-separated, or blocked –The set of nodes E d-separates sets X and Y The textbook (p. 499) mentions the Markov blanket, which is the same general concept –But the description is brief and unclear…! There are three ways to block a path from X i to Y j

18 XZY #1 XZY XZY #2 XZY #3 This variable is not in E! (Nor are its descendents) The variable Z is in E

19 Examples GWR RainWet Grass Worms P(W | R, G) = P(W | G) FCT TiredFluCough P(T | C, F) = P(T | F) MIW WorkMoneyInherit P(W | I, M)  P(W | M) P(W | I) = P(W)

20 Examples XZY X ind. of Y? X ind. of Y given Z? XZY XZY XZY Yes X Z Y X ind. of Y? X ind. of Y given Z? NoYes NoYes No

21 Examples (cont.) X Z Y X – wet grass Y – rainbow Z – rain X – rain Y – sprinkler Z – wet grass W – worms P(X, Y)  P(X) P(Y) P(X | Y, Z) = P(X | Z) P(X, Y) = P(X) P(Y) P(X | Y, Z)  P(X | Z) P(X | Y, W)  P(X | W) X Z Y W Are X and Y ind.? Are X and Y cond. ind. given…?

22 Examples X W Y X – rain Y – sprinkler Z – rainbow W – wet grass Z X W Y X – rain Y – sprinkler Z – rainbow W – wet grass Z P(X,Y) = P(X) P(Y) Yes P(X | Y, Z) = P(X | Z) Yes P(X,Y)  P(X) P(Y) No P(X | Y, Z)  P(X | Z) No Are X and Y independent? Are X and Y conditionally independent given Z?

23 Conditional Independence Where are conditional independences here? Radio and Ignition, given Battery? Yes Radio and Starts, given Ignition? Yes Gas and Radio, given Battery? Yes Gas and Radio, given Starts? No Gas and Radio, given nil? Yes Gas and Battery, given Moves? No (why?)

24 Why is this important? Helps the developer (or the user) verify the graph structure –Are these things really independent? –Do I need more/fewer arcs? Gives hints about computational efficiencies Shows that you understand BNs…