Reasoning under Uncertainty Reasoning under Uncertainty Course: CS40022 Course: CS40022 Instructor: Dr. Pallab Dasgupta Pallab Dasgupta Instructor: Dr. Department of Computer Science & Engineering Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Kharagpur Indian Institute of Technology
Handling uncertain knowledge Handling uncertain knowledge � ∀ ∀ p Symptom(p, Toothache) p Symptom(p, Toothache) � ⇒ Disease(p, Cavity) ⇒ Disease(p, Cavity) � Not correct Not correct – – toothache can be caused in toothache can be caused in � many other cases many other cases � ∀ ∀ p Symptom(p, Toothache) p Symptom(p, Toothache) � ⇒ Disease(p, Cavity) ∨ ⇒ Disease(p, Cavity) ∨ ∨ ) ∨ Disease(p, GumDisease GumDisease) Disease(p, ∨ … ) ∨ Disease(p, ImpactedWisdom ImpactedWisdom) … Disease(p, CSE, IIT Kharagpur Kharagpur CSE, IIT
Handling uncertain knowledge Handling uncertain knowledge � ∀ ∀ p Disease(p, Cavity) p Disease(p, Cavity) � ⇒ Symptom(p, Toothache) ⇒ Symptom(p, Toothache) � This is not correct either, since all cavities This is not correct either, since all cavities � do not cause toothache do not cause toothache CSE, IIT Kharagpur Kharagpur CSE, IIT
Reasons for using probability Reasons for using probability � Specification becomes too large Specification becomes too large � � It is too much work to list the complete set It is too much work to list the complete set � of antecedents or consequents needed to of antecedents or consequents needed to ensure an exception- -less rule less rule ensure an exception � Theoretical ignorance Theoretical ignorance � � The complete set of antecedents is not The complete set of antecedents is not � known known � Practical ignorance Practical ignorance � � The truth of the antecedents is not known, The truth of the antecedents is not known, � but we still wish to reason but we still wish to reason CSE, IIT Kharagpur Kharagpur CSE, IIT
Axioms of Probability 1. All prob are between 0 and 1: 0 ≤ P(A) ≤ 1 2. P(True) = 1 and P(False) = 0 3. P(A ∨ B) = P(A) + P(B) – P(A ∧ B) Bayes’ Rule P(A ∧ B) = P(A | B) P(B) P(A ∧ B) = P(B | A) P(A) P ( A | B ) P ( B ) = P ( B | A ) P ( A ) CSE, IIT Kharagpur Kharagpur CSE, IIT
Belief Networks Belief Networks A belief network is a graph with the following: A belief network is a graph with the following: Nodes: Set of random variables Set of random variables Nodes: 1. 1. Directed links: The intuitive meaning of a link The intuitive meaning of a link Directed links: 2. 2. from node X to node Y is that X has a direct from node X to node Y is that X has a direct influence on Y influence on Y Each node has a conditional probability conditional probability Each node has a 3. 3. table that quantifies the effects that the that quantifies the effects that the table parent have on the node. parent have on the node. The graph has no directed cycles (DAG) The graph has no directed cycles (DAG) 4. 4. CSE, IIT Kharagpur Kharagpur CSE, IIT
Example Example � Burglar alarm at home Burglar alarm at home � � Fairly reliable at detecting a burglary Fairly reliable at detecting a burglary � � Responds at times to minor earthquakes Responds at times to minor earthquakes � � Two neighbors, on hearing alarm, calls police Two neighbors, on hearing alarm, calls police � � John always calls when he hears the John always calls when he hears the � alarm, but sometimes confuses the alarm, but sometimes confuses the telephone ringing with the alarm and calls telephone ringing with the alarm and calls then, too. then, too. � Mary likes loud music and sometimes Mary likes loud music and sometimes � misses the alarm altogether misses the alarm altogether CSE, IIT Kharagpur Kharagpur CSE, IIT
Belief Network Example Belief Network Example P(B) P(E) P(B) P(E) Burglary Earthquake 0.001 0.001 0.002 0.002 B E P(A) B E P(A) T T T T 0.95 0.95 Alarm T F 0.95 T F 0.95 F T 0.29 F T 0.29 F F 0.001 F F 0.001 A P(J) A P(J) T 0.90 A P(M) T 0.90 A P(M) JohnCalls MaryCalls F 0.05 T 0.70 F 0.05 T 0.70 F 0.01 F 0.01 CSE, IIT Kharagpur Kharagpur CSE, IIT
The joint probability distribution The joint probability distribution � A generic entry in the joint probability A generic entry in the joint probability � distribution P(x 1 , …, x x n ) is given by: distribution P(x 1 , …, n ) is given by: n ∏ = P ( x ,..., x ) P ( x | Parents ( X )) 1 n i i = i 1 CSE, IIT Kharagpur Kharagpur CSE, IIT
The joint probability distribution The joint probability distribution � Probability of the event that the alarm has Probability of the event that the alarm has � sounded but neither a burglary nor an sounded but neither a burglary nor an earthquake has occurred, and both Mary and earthquake has occurred, and both Mary and John call: John call: ∧ M ∧ A ∧ ¬ ¬ B ∧ ¬ ¬ E) P(J ∧ M ∧ A ∧ B ∧ E) P(J ¬ B ∧ ¬ ¬ E) = P(J | A) P(M | A) P(A | ¬ B ∧ E) = P(J | A) P(M | A) P(A | ¬ B) P( ¬ E) P( ¬ B) P( ¬ E) P( = 0.9 X 0.7 X 0.001 X 0.999 X 0.998 = 0.9 X 0.7 X 0.001 X 0.999 X 0.998 = 0.00062 = 0.00062 CSE, IIT Kharagpur Kharagpur CSE, IIT
Conditional independence Conditional independence P ( x ,..., x ) n 1 = P ( x | x ,..., x ) P ( x ,..., x ) − − n n 1 1 n 1 1 = P ( x | x ,..., x ) P ( x | x ,..., x ) − − − n n 1 1 n 1 n 2 1 ... P ( x | x ) P ( x ) 2 1 1 n ∏ = P ( x | x ,..., x ) − i i 1 1 = i 1 � The belief network represents conditional The belief network represents conditional � independence: independence: = P ( X | X ,..., X ) P ( X | Parents ( X )) i i i i 1 CSE, IIT Kharagpur Kharagpur CSE, IIT
Incremental Network Construction Incremental Network Construction 1. Choose the set of relevant variables Choose the set of relevant variables X X i that 1. i that describe the domain describe the domain 2. Choose an ordering for the variables ( Choose an ordering for the variables ( very very 2. important step ) ) important step 3. While there are variables left: While there are variables left: 3. a) Pick a variable X and add a node for it Pick a variable X and add a node for it a) b) Set Parents(X) to some minimal set of Set Parents(X) to some minimal set of b) existing nodes such that the conditional existing nodes such that the conditional independence property is satisfied independence property is satisfied c) Define the conditional Define the conditional prob prob table for X table for X c) CSE, IIT Kharagpur Kharagpur CSE, IIT
Conditional Independence Relations Conditional Independence Relations If every undirected path from a node in X to a If every undirected path from a node in X to a � � node in Y is d- -separated by a given set of separated by a given set of node in Y is d evidence nodes E, then X and Y are evidence nodes E, then X and Y are conditionally independent given E. conditionally independent given E. A set of nodes E d d- -separates separates two sets of two sets of A set of nodes E � � nodes X and Y if every undirected path from a nodes X and Y if every undirected path from a node in X to a node in Y is blocked blocked given E. given E. node in X to a node in Y is CSE, IIT Kharagpur Kharagpur CSE, IIT
Conditional Independence Relations Conditional Independence Relations � A path is blocked given a set of nodes E if A path is blocked given a set of nodes E if � there is a node Z on the path for which one of there is a node Z on the path for which one of three conditions holds: three conditions holds: 1. Z is in E and Z has one arrow on the path Z is in E and Z has one arrow on the path 1. leading in and one arrow out leading in and one arrow out 2. Z is in E and Z has both path arrows Z is in E and Z has both path arrows 2. leading out leading out 3. Neither Z nor any descendant of Z is in E, Neither Z nor any descendant of Z is in E, 3. and both path arrows lead in to Z and both path arrows lead in to Z CSE, IIT Kharagpur Kharagpur CSE, IIT
Cond Independence in belief networks Independence in belief networks Cond Battery Petrol Ignition Radio Starts Whether there is petrol and whether the radio plays are independent given evidence about whether the ignition takes place Petrol and Radio are independent if it is known whether the battery works CSE, IIT Kharagpur Kharagpur CSE, IIT
Cond Independence in belief networks Independence in belief networks Cond Battery Petrol Ignition Radio Starts Petrol and Radio are independent given no evidence at all. But they are dependent given evidence about whether the car starts. If the car does not start, then the radio playing is increased evidence that we are out of petrol. CSE, IIT Kharagpur Kharagpur CSE, IIT
Recommend
More recommend