1 CMSC 471 Fall 2002 Class #19 – Monday, November 4.

Slides:



Advertisements
Similar presentations
Probabilistic Reasoning Bayesian Belief Networks Constructing Bayesian Networks Representing Conditional Distributions Summary.
Advertisements

Bayesian Networks CSE 473. © Daniel S. Weld 2 Last Time Basic notions Atomic events Probabilities Joint distribution Inference by enumeration Independence.
1 Some Comments on Sebastiani et al Nature Genetics 37(4)2005.
BAYESIAN NETWORKS. Bayesian Network Motivation  We want a representation and reasoning system that is based on conditional independence  Compact yet.
Probabilistic Reasoning Course 8
Identifying Conditional Independencies in Bayes Nets Lecture 4.
For Monday Read chapter 18, sections 1-2 Homework: –Chapter 14, exercise 8 a-d.
For Monday Finish chapter 14 Homework: –Chapter 13, exercises 8, 15.
Knowledge Representation and Reasoning
Bayesian Networks Chapter 14 Section 1, 2, 4. Bayesian networks A simple, graphical notation for conditional independence assertions and hence for compact.
Review: Bayesian learning and inference
Bayesian Networks Chapter 2 (Duda et al.) – Section 2.11
1 Chapter 12 Probabilistic Reasoning and Bayesian Belief Networks.
Bayesian Networks. Motivation The conditional independence assumption made by naïve Bayes classifiers may seem to rigid, especially for classification.
Bayesian networks Chapter 14 Section 1 – 2.
Bayesian Belief Networks
1 Bayesian Reasoning Chapter 13 CMSC 471 Adapted from slides by Tim Finin and Marie desJardins.
Bayesian Networks What is the likelihood of X given evidence E? i.e. P(X|E) = ?
5/25/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 16, 6/1/2005 University of Washington, Department of Electrical Engineering Spring 2005.
1 Bayesian Networks Chapter ; 14.4 CS 63 Adapted from slides by Tim Finin and Marie desJardins. Some material borrowed from Lise Getoor.
Bayesian Reasoning. Tax Data – Naive Bayes Classify: (_, No, Married, 95K, ?)
1 Midterm Exam Mean: 72.7% Max: % Kernel Density Estimation.
Does Naïve Bayes always work?
Probabilistic Reasoning
Adapted from slides by Tim Finin
Artificial Intelligence CS 165A Tuesday, November 27, 2007  Probabilistic Reasoning (Ch 14)
Bayesian networks Chapter 14. Outline Syntax Semantics.
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes March 13, 2012.
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.
Bayesian Statistics and Belief Networks. Overview Book: Ch 13,14 Refresher on Probability Bayesian classifiers Belief Networks / Bayesian Networks.
1 Monte Carlo Artificial Intelligence: Bayesian Networks.
Introduction to Bayesian Networks
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule Jim Little Uncertainty 2 Nov 3, 2014 Textbook §6.1.3.
1 CMSC 671 Fall 2001 Class #21 – Tuesday, November 13.
Marginalization & Conditioning Marginalization (summing out): for any sets of variables Y and Z: Conditioning(variant of marginalization):
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
1 CMSC 671 Fall 2010 Class #18/19 – Wednesday, November 3 / Monday, November 8 Some material borrowed with permission from Lise Getoor.
CSE 473 Uncertainty. © UW CSE AI Faculty 2 Many Techniques Developed Fuzzy Logic Certainty Factors Non-monotonic logic Probability Only one has stood.
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.
CS 541: Artificial Intelligence Lecture VII: Inference in Bayesian Networks.
Bayesian Networks Chapter 2 (Duda et al.) – Section 2.11 CS479/679 Pattern Recognition Dr. George Bebis.
Bayesian Reasoning Chapter 13 Thomas Bayes,
Bayesian Reasoning Chapter 13 Thomas Bayes,
Review of Probability.
CS 2750: Machine Learning Directed Graphical Models
Bayesian networks Chapter 14 Section 1 – 2.
Does Naïve Bayes always work?
Qian Liu CSE spring University of Pennsylvania
Read R&N Ch Next lecture: Read R&N
Read R&N Ch Next lecture: Read R&N
Professor Marie desJardins,
Professor Marie desJardins,
Class #21 – Monday, November 10
Class #19 – Tuesday, November 3
Bayesian Reasoning Chapter 13 Thomas Bayes,
Bayesian Reasoning Chapter 13 Thomas Bayes,
Class #16 – Tuesday, October 26
Class #22/23 – Wednesday, November 12 / Monday, November 17
Bayesian networks Chapter 14 Section 1 – 2.
Probabilistic Reasoning
Read R&N Ch Next lecture: Read R&N
Presentation transcript:

1 CMSC 471 Fall 2002 Class #19 – Monday, November 4

2 Today’s class (Probability theory) Bayesian inference –From the joint distribution –Using independence/factoring –From sources of evidence Bayesian networks –Network structure –Conditional probability tables –Conditional independence –Inference in Bayesian networks

3 Bayesian Reasoning / Bayesian Networks Chapters 14,

4 Why probabilities anyway? Kolmogorov showed that three simple axioms lead to the rules of probability theory –De Finetti, Cox, and Carnap have also provided compelling arguments for these axioms 1.All probabilities are between 0 and 1: 0 <= P(a) <= 1 2.Valid propositions (tautologies) have probability 1, and unsatisfiable propositions have probability 0: P(true) = 1 ; P(false) = 0 3.The probability of a disjunction is given by: P(a  b) = P(a) + P(b) – P(a  b) abab a b

5 Inference from the joint: Example alarm¬alarm earthquake¬earthquakeearthquake¬earthquake burglary ¬burglary P(Burglary | alarm) = α P(Burglary, alarm) = α [P(Burglary, alarm, earthquake) + P(Burglary, alarm, ¬earthquake) = α [ (.001,.01) + (.008,.09) ] = α [ (.009,.1) ] Since P(burglary | alarm) + P(¬burglary | alarm) = 1, α = 1/( ) = (i.e., P(alarm) = 1/α =.109 – quizlet: how can you verify this?) P(burglary | alarm) =.009 * = P(¬burglary | alarm) =.1 * =.9173

6 Independence When two sets of propositions do not affect each others’ probabilities, we call them independent, and can easily compute their joint and conditional probability: –Independent (A, B) → P(A  B) = P(A) P(B), P(A | B) = P(A) For example, {moon-phase, light-level} might be independent of {burglary, alarm, earthquake} –Then again, it might not: Burglars might be more likely to burglarize houses when there’s a new moon (and hence little light) –But if we know the light level, the moon phase doesn’t affect whether we are burglarized –Once we’re burglarized, light level doesn’t affect whether the alarm goes off We need a more complex notion of independence, and methods for reasoning about these kinds of relationships

7 Conditional independence Absolute independence: –A and B are independent if P(A  B) = P(A) P(B); equivalently, P(A) = P(A | B) and P(B) = P(B | A) A and B are conditionally independent given C if –P(A  B | C) = P(A | C) P(B | C) This lets us decompose the joint distribution: –P(A  B  C) = P(A | C) P(B | C) P(C) Moon-Phase and Burglary are conditionally independent given Light-Level Conditional independence is weaker than absolute independence, but still useful in decomposing the full joint probability distribution

8 Bayes’ rule Bayes rule is derived from the product rule: –P(Y | X) = P(X | Y) P(Y) / P(X) Often useful for diagnosis: –If X are (observed) effects and Y are (hidden) causes, –We may have a model for how causes lead to effects (P(X | Y)) –We may also have prior beliefs (based on experience) about the frequency of occurrence of effects (P(Y)) –Which allows us to reason abductively from effects to causes (P(Y | X)).

9 Bayesian inference In the setting of diagnostic/evidential reasoning –Know prior probability of hypothesis conditional probability –Want to compute the posterior probability Bayes’ theorem (formula 1):

10 Simple Bayesian diagnostic reasoning Knowledge base: –Evidence / manifestations:E 1, … E m –Hypotheses / disorders:H 1, … H n E j and H i are binary; hypotheses are mutually exclusive (non- overlapping) and exhaustive (cover all possible cases) –Conditional probabilities:P(E j | H i ), i = 1, … n; j = 1, … m Cases (evidence for a particular instance): E 1, …, E l Goal: Find the hypothesis H i with the highest posterior –Max i P(H i | E 1, …, E l )

11 Bayesian diagnostic reasoning II Bayes’ rule says that –P(H i | E 1, …, E l ) = P(E 1, …, E l | H i ) P(H i ) / P(E 1, …, E l ) Assume each piece of evidence E i is conditionally independent of the others, given a hypothesis H i, then: –P(E 1, …, E l | H i ) =  l j=1 P(E j | H i ) If we only care about relative probabilities for the Hi, then we have: –P(H i | E 1, …, E l ) = α P(H i )  l j=1 P(E j | H i )

12 Limitations of simple Bayesian inference Cannot easily handle multi-fault situation, nor cases where intermediate (hidden) causes exist: –Disease D causes syndrome S, which causes correlated manifestations M 1 and M 2 Consider a composite hypothesis H 1  H 2, where H 1 and H 2 are independent. What is the relative posterior? –P(H 1  H 2 | E 1, …, E l ) = α P(E 1, …, E l | H 1  H 2 ) P(H 1  H 2 ) = α P(E 1, …, E l | H 1  H 2 ) P(H 1 ) P(H 2 ) = α  l j=1 P(E j | H 1  H 2 ) P(H 1 ) P(H 2 ) How do we compute P(E j | H 1  H 2 ) ??

13 Limitations of simple Bayesian inference II Assume H1 and H2 are independent, given E1, …, El? –P(H 1  H 2 | E 1, …, E l ) = P(H 1 | E 1, …, E l ) P(H 2 | E 1, …, E l ) This is a very unreasonable assumption –Earthquake and Burglar are independent, but not given Alarm: P(burglar | alarm, earthquake) << P(burglar | alarm) Another limitation is that simple application of Bayes’ rule doesn’t allow us to handle causal chaining: –A: year’s weather; B: cotton production; C: next year’s cotton price –A influences C indirectly: A→ B → C –P(C | B, A) = P(C | B) Need a richer representation to model interacting hypotheses, conditional independence, and causal chaining Next time: conditional independence and Bayesian networks!

14 Bayesian Belief Networks (BNs) Definition: BN = (DAG, CPD) –DAG: directed acyclic graph (BN’s structure) Nodes: random variables (typically binary or discrete, but methods also exist to handle continuous variables) Arcs: indicate probabilistic dependencies between nodes (lack of link signifies conditional independence) –CPD: conditional probability distribution (BN’s parameters) Conditional probabilities at each node, usually stored as a table (conditional probability table, or CPT) –Root nodes are a special case – no parents, so just use priors in CPD:

15 Example BN a b c d e P(C|A) = 0.2 P(C|~A) = P(B|A) = 0.3 P(B|~A) = P(A) = P(D|B,C) = 0.1 P(D|B,~C) = 0.01 P(D|~B,C) = 0.01 P(D|~B,~C) = P(E|C) = 0.4 P(E|~C) = Note that we only specify P(A) etc., not P(¬A), since they have to add to one

16 Topological semantics A node is conditionally independent of its non- descendants given its parents A node is conditionally independent of all other nodes in the network given its parents, children, and children’s parents (also known as its Markov blanket) The method called d-separation can be applied to decide whether a set of nodes X is independent of another set Y, given a third set Z

17 Independence assumption – where q is any set of variables (nodes) other than and its successors – blocks influence of other nodes on and its successors (q influences only through variables in ) –With this assumption, the complete joint probability distribution of all variables in the network can be represented by (recovered from) local CPD by chaining these CPD q Independence and chaining

18 Chaining: Example Computing the joint probability for all variables is easy: P(a, b, c, d, e) = P(e | a, b, c, d) P(a, b, c, d) by Bayes’ theorem =P(e | c) P(a, b, c, d) by indep. assumption = P(e | c) P(d | a, b, c) P(a, b, c) =P(e | c) P(d | b, c) P(c | a, b) P(a, b) =P(e | c) P(d | b, c) P(c | a) P(b | a) P(a) a b c d e

19 Direct inference with BNs Now suppose we just want the probability for one variable Belief update method Original belief (no variables are instantiated): Use prior probability p(x i ) If x i is a root, then P(x i ) is given directly in the BN (CPT at X i ) Otherwise, –P(x i ) = Σ πi P(x i | π i ) P(π i ) In this equation, P(x i | π i ) is given in the CPT, but computing P(π i ) is complicated

20 Computing π i : Example P (d) = P(d | b, c) P(b, c) P(b, c) = P(a, b, c) + P(¬a, b, c) (marginalizing) = P(b | a, c) p (a, c) + p(b | ¬a, c) p(¬a, c) (product rule) = P(b | a) P(c | a) P(a) + P(b | ¬a) P(c | ¬a) P(¬a) If some variables are instantiated, can “plug that in” and reduce amount of marginalization Still have to marginalize over all values of uninstantiated parents – not computationally feasible with large networks a b c d e

21 Representational extensions Compactly representing CPTs –Noisy-OR –Noisy-MAX Adding continuous variables –Discretization –Use density functions (usually mixtures of Gaussians) to build hybrid Bayesian networks (with discrete and continuous variables)

22 Inference tasks Simple queries: Computer posterior marginal P(X i | E=e) –E.g., P(NoGas | Gauge=empty, Lights=on, Starts=false) Conjunctive queries: –P(X i, X j | E=e) = P(X i | e=e) P(X j | X i, E=e) Optimal decisions: Decision networks include utility information; probabilistic inference is required to find P(outcome | action, evidence) Value of information: Which evidence should we seek next? Sensitivity analysis: Which probability values are most critical? Explanation: Why do I need a new starter motor?

23 Approaches to inference Exact inference –Enumeration –Variable elimination –Clustering / join tree algorithms Approximate inference –Stochastic simulation / sampling methods –Markov chain Monte Carlo methods –Genetic algorithms –Neural networks –Simulated annealing –Mean field theory