Quantifying Uncertainty

Similar documents
Bayesian networks. Chapter 14, Sections 1 4

Bayesian Network. Outline. Bayesian Network. Syntax Semantics Exact inference by enumeration Exact inference by variable elimination

Bayesian networks. Chapter Chapter

Probabilistic Reasoning. (Mostly using Bayesian Networks)

Quantifying uncertainty & Bayesian networks

Probabilistic Reasoning Systems

Objectives. Probabilistic Reasoning Systems. Outline. Independence. Conditional independence. Conditional independence II.

Uncertainty. Logic and Uncertainty. Russell & Norvig. Readings: Chapter 13. One problem with logical-agent approaches: C:145 Artificial

Inference in Bayesian networks

Uncertainty and Bayesian Networks

Bayesian Networks. Motivation

Probabilistic representation and reasoning

Bayesian Networks. Semantics of Bayes Nets. Example (Binary valued Variables) CSC384: Intro to Artificial Intelligence Reasoning under Uncertainty-III

CS 380: ARTIFICIAL INTELLIGENCE UNCERTAINTY. Santiago Ontañón

Uncertainty. 22c:145 Artificial Intelligence. Problem of Logic Agents. Foundations of Probability. Axioms of Probability

Probabilistic Reasoning. Kee-Eung Kim KAIST Computer Science

COMP5211 Lecture Note on Reasoning under Uncertainty

Probabilistic representation and reasoning

Ch.6 Uncertain Knowledge. Logic and Uncertainty. Representation. One problem with logical approaches: Department of Computer Science

Graphical Models - Part I

Bayesian networks. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018

Artificial Intelligence Methods. Inference in Bayesian networks

Directed Graphical Models

last two digits of your SID

Outline. CSE 573: Artificial Intelligence Autumn Bayes Nets: Big Picture. Bayes Net Semantics. Hidden Markov Models. Example Bayes Net: Car

Inference in Bayesian Networks

PROBABILISTIC REASONING SYSTEMS

Informatics 2D Reasoning and Agents Semester 2,

Reasoning Under Uncertainty

Introduction to Artificial Intelligence Belief networks

Review: Bayesian learning and inference

CS 484 Data Mining. Classification 7. Some slides are from Professor Padhraic Smyth at UC Irvine

School of EECS Washington State University. Artificial Intelligence

Uncertainty. Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, CS151, Spring 2004

CS 2750: Machine Learning. Bayesian Networks. Prof. Adriana Kovashka University of Pittsburgh March 14, 2016

Reasoning Under Uncertainty

CS 188: Artificial Intelligence Spring Announcements

Bayesian Networks. Philipp Koehn. 6 April 2017

Bayesian Networks. Philipp Koehn. 29 October 2015

CSEP 573: Artificial Intelligence

Learning Bayesian Networks (part 1) Goals for the lecture

Resolution or modus ponens are exact there is no possibility of mistake if the rules are followed exactly.

Inference in Bayesian networks

Probabilistic Representation and Reasoning

Artificial Intelligence

Quantifying Uncertainty & Probabilistic Reasoning. Abdulla AlKhenji Khaled AlEmadi Mohammed AlAnsari

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

qfundamental Assumption qbeyond the Bayes net Chain rule conditional independence assumptions,

CSE 473: Artificial Intelligence Autumn 2011

Announcements. CS 188: Artificial Intelligence Spring Probability recap. Outline. Bayes Nets: Big Picture. Graphical Model Notation

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

Bayesian Reasoning. Adapted from slides by Tim Finin and Marie desjardins.

Axioms of Probability? Notation. Bayesian Networks. Bayesian Networks. Today we ll introduce Bayesian Networks.

Bayesian networks. Chapter AIMA2e Slides, Stuart Russell and Peter Norvig, Completed by Kazim Fouladi, Fall 2008 Chapter 14.

Lecture 10: Bayesian Networks and Inference

Bayes Networks 6.872/HST.950

Introduction to Artificial Intelligence. Unit # 11

14 PROBABILISTIC REASONING

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

Bayesian networks. Chapter Chapter

Announcements. Inference. Mid-term. Inference by Enumeration. Reminder: Alarm Network. Introduction to Artificial Intelligence. V22.

Artificial Intelligence

Bayesian networks. Chapter Chapter Outline. Syntax Semantics Parameterized distributions. Chapter

COMP9414: Artificial Intelligence Reasoning Under Uncertainty

Uncertainty. Chapter 13

Bayesian Networks BY: MOHAMAD ALSABBAGH

COS402- Artificial Intelligence Fall Lecture 10: Bayesian Networks & Exact Inference

CS 5522: Artificial Intelligence II

Bayes Nets: Independence

CS 188: Artificial Intelligence Spring Announcements

Artificial Intelligence Bayesian Networks

Course Overview. Summary. Outline

CS 5522: Artificial Intelligence II

Where are we? Knowledge Engineering Semester 2, Reasoning under Uncertainty. Probabilistic Reasoning

Probability. CS 3793/5233 Artificial Intelligence Probability 1

UNCERTAINTY. In which we see what an agent should do when not all is crystal-clear.

Foundations of Artificial Intelligence

Bayes Nets III: Inference

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

Probabilistic Models Bayesian Networks Markov Random Fields Inference. Graphical Models. Foundations of Data Analysis

CS 730/730W/830: Intro AI

FIRST ORDER LOGIC AND PROBABILISTIC INFERENCING. ECE457 Applied Artificial Intelligence Page 1

Uncertainty. CmpE 540 Principles of Artificial Intelligence Pınar Yolum Uncertainty. Sources of Uncertainty

CS 343: Artificial Intelligence

CS 188: Artificial Intelligence Fall 2009

Artificial Intelligence Bayes Nets: Independence

Uncertainty. Russell & Norvig Chapter 13.

p(x) p(x Z) = y p(y X, Z) = αp(x Y, Z)p(Y Z)

Bayesian Networks. Material used

Bayesian belief networks

Bayesian Belief Network

Introduction to Probabilistic Reasoning. Image credit: NASA. Assignment

CS 188: Artificial Intelligence. Bayes Nets

Artificial Intelligence Uncertainty

Defining Things in Terms of Joint Probability Distribution. Today s Lecture. Lecture 17: Uncertainty 2. Victor R. Lesser

Basic Probability and Statistics

Probabilistic Models

Bayes Networks. CS540 Bryan R Gibson University of Wisconsin-Madison. Slides adapted from those used by Prof. Jerry Zhu, CS540-1

Chapter 13 Quantifying Uncertainty

Transcription:

Quantifying Uncertainty CSL 302 ARTIFICIAL INTELLIGENCE SPRING 2014

Outline Probability theory - basics Probabilistic Inference oinference by enumeration Conditional Independence Bayesian Networks Learning Probabilistic Models onaïve Bayes Classifier CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 2

Non-monotonic logic Traditional logic is monotonic othe set of legal conclusions grows monotonically with the set of facts appearing in our initial database When humans reason, we use defeasible logic oalmost every conclusion we draw is subject to reversal oif we find contradicting information later, we ll want to retract earlier inferences Nonmonotonic logic, or defeasible reasoning, allows a statement to be retracted Solution: Truth Maintenance okeep explicit information about which facts/inferences support other inferences oif the foundation disappears, so must the conclusion CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 3

Uncertainty On the other hand, the problem might not be in the fact that T/F values can change over time but rather that we are not certain of the T/F value Agents almost never have access to the whole truth about their environment Agents must act in the presence of uncertainty oincompleteness and/or incorrectness of rules used by the agent olimited and ambiguous sensors oimperfection/noise in agent s actions odynamic nature of the environment CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 4

Pitfalls of pure logic Laziness otoo much work to list all conditions needed to ensure an exceptionless rule Theoretical ignorance oscience has no complete theory for the domain Practical ignorance oeven if we know all the rules, we may be uncertain about them owe only have a degree of belief in them CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 5

Probability Theory vs. Logic Probability - tool for handling degrees of belief osummarizes uncertainty due to laziness and ignorance Logic Probability Theory Ontological commitments world is composed of facts that do or do not hold world is composed of facts that do or do not hold Epistemological commitments each sentence is true or false or unknown numerical degree of belief between 0(sentence for certainly false) and 1(sentences are certainly true) CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 6

Rational Agent Approach Choose action A that maximizes expected utility omaximizes Prob(A)*Utility(A) Prob(A) - probability that A will succeed Utility(A) - utility value to agent of A s outcomes CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 7

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 8

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 9

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 10

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 11

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 12

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 13

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 14

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 15

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 16

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 17

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 18

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 19

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 20

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 21

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 22

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 23

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 24

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 25

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 26

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 27

Outline Probability theory - basics Probabilistic Inference oinference by enumeration Conditional Independence Bayesian Networks Learning Probabilistic Models onaïve Bayes Classifier CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 28

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 29

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 30

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 31

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 32

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 33

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 34

Global semantics Global semantics defines the full joint distribution as the product of the local conditional distributions: P(x 1,..., x n ) = Π n i = 1P(x i par ents(x i )) e.g., P(j m a b e) = B J A E M CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 35

Global semantics Global semantics defines the full joint distribution as the product of the local conditional distributions: B E P(x 1,..., x n ) = Π n i = 1P(x i par ents(x i )) A e.g., P(j m a b e) = P(j a)p(m a)p(a b, e)p( b)p( e) = 0.9 0.7 0.001 0.999 0.998 0.00063 J M CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 36

Const r uct ing Bayesian net wor ks Need a method such that a series of locally testable assertions of conditional independence guarantees the required global semantics 1. Choose an ordering of variables X 1,..., X n 2. For i = 1 to n add X i to the network select parents from X 1,..., X i 1 such that P(X i Par ents(x i )) = P(X i X 1,..., X i 1 ) This choice of parents guarantees the global semantics: P(X 1,..., X n ) = Π n i = 1P(X i X 1,..., X i 1 ) (chain rule) = Π n i = 1 P(X i Par ents(x i )) (by const ruction) CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 37

Example Suppose we choose the ordering M, J, A, B, E MaryCalls JohnCalls P(J M ) = P(J )? CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 38

Example Suppose we choose the ordering M, J, A, B, E MaryCalls JohnCalls Alarm P(J M ) = P(J )? No P(A J, M ) = P(A J )? P(A J, M ) = P(A)? CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 39

Example Suppose we choose the ordering M, J, A, B, E MaryCalls JohnCalls Alarm Burglary P(J M ) = P(J )? No P(A J, M ) = P(A J )? P(A J, M ) = P(A)? P(B A,J, M ) = P(B A)? P(B A,J, M ) = P(B )? No CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 40

Example Suppose we choose the ordering M, J, A, B, E MaryCalls JohnCalls Alarm Burglary Earthquake P(J M ) = P(J )? No P(A J, M ) = P(A J )? P(A J, M ) = P(A)? P(B A,J, M ) = P(B A)? Yes P(B A,J, M ) = P(B )? No P(E B, A,J, M ) = P(E A)? P(E B, A,J, M ) = P(E A,B )? No CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 41 Chapt er 14.1 3 16

Example Suppose we choose the ordering M, J, A, B, E MaryCalls JohnCalls Alarm Burglary Earthquake P(J M ) = P(J )? No P(A J, M ) = P(A J )? P(A J, M ) = P(A)? P(B A,J, M ) = P(B A)? Yes P(B A,J, M ) = P(B )? No P(E B, A,J, M ) = P(E A)? No P(E B, A,J, M ) = P(E A,B )? Yes No CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 42 Chapt er 14.1 3 17

Example cont d. MaryCalls JohnCalls Alarm Burglary Earthquake Deciding conditional independence is hard in noncausal directions (Causal models and conditional independence seem hardwired for humans!) Assessing conditional probabilities is hard in noncausal directions Network is less compact: 1+ 2+ 4+ 2+ 4= 13 numbers needed CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 43 Chapt er 14.1 3 18

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 44

I nfer ence by enumer at ion Slightly intelligent way to sum out variables from the joint without actually constructing its explicit representation Simple query on the burglary network: P(B j,m) = P(B, j,m)/p(j,m) = αp(b, j,m) = α Σ e Σ a P(B, e, a, j,m) B J A E M Rewrite full joint entries using product of CPT entries: P(B j,m) = α Σ e Σ a P(B )P(e)P(a B, e)p(j a)p(m a) = αp(b ) Σ e P(e) Σ a P(a B, e)p(j a)p(m a) Recursive depth-first enumeration: O(n) space, O(d n ) time CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 45

Enumer at ion algor it hm funct ion Enumer at ion-a sk (X,e,bn) returns a distribution over X input s: X, the query variable e, observed values for variables E bn, a Bayesian network with variables { X } E Y Q(X ) a distribution over X, initially empty for each value x i of X do extend e with value x i for X Q(x i ) Enumer at e-al l (Var s[bn],e) return Nor mal ize(q(x )) funct ion Enumer at e-al l (vars,e) returns a real number if Empt y?(vars) then return 1.0 Y Fir st (vars) if Y has value y in e then return P(y Pa(Y )) Enumer at e-al l (Rest (vars),e) else return y P(y Pa(Y )) Enumer at e-al l (Rest (vars),e y ) where e y is e extended with Y = y CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 46 Chapt er 14.4 5 5

Evaluation tree P(b).001 P(e).002 P( e).998 P(a b,e) P( a b,e) P(a b, e) P( a b, e).95.05.94.06 P(j a).90 P(j a).05 P(j a).90 P(j a).05 P(m a) P(m a).70.01 P(m a) P(m a).70.01 Enumeration is inefficient: repeated computation e.g., computes P(j a)p(m a) for each value of e CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 47

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 48

A B C P(A,B,C) T T T 0.1 T T F 0.1 T F T 0.1 T F F 0.1 F T T 0.1 F T F 0.1 F F T 0.1 F F F 0.3 CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 49

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 50

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 52

14.4. Exact Inference in Bayesian Networks 527 T F.7 T F.8 T T F.3 F T.9 F T.6 T F T.7 F F.1 F F.4 T F F.7 A B f 1 (A,B ) B C f 2 (B,C) A B C f 3 (A,B, C) T T.3 T T.2 T T FT T.3.2= T.06.9 T F.7 T F.8 T T F.3.8=.24 F T F.9 F T.9 F T.6 T F T.7.6=.42 F F.1 F F.4 T F F F F.7.4= T.28.1 F T FT F.9.2= F.18.1 F T F.9.8=.72 Figure 14.10 Illustrating pointwise multiplication: F F f 1 (A,B T ) f.1 2 (B,C).6=.06 = f 3 (A,B F F F.1.4=.04 Summing out a variable from a product of factors is done by adding up the su Figure 14.10 Illustrating pointwise multiplication: f 1 (A,B) f 2 (B,C) = f 3 (A,B, C). formed by fixing the variable to each of its values in turn. For example, to sum o f 3 (A,B, C),wewrite Summing out a variable from a product of factors is done by adding up the submatrices formed by fixing the variable to each of its values in turn. For example, to sum out A from f(b,c) = f f 3 (A,B, C), we write 3 (A,B, C) = f 3 (a, B, C) + f 3 ( a, B, C) f(b,c) = = = a a f 3 (A,B, C) = f 3 (a, B, C) + f 3 ( a, B, C).06.24.42.28.06.24.42.28 + +.18.72.06.04.18.72.06.04 =.24.96.48.32 The only trick is to notice that any factor that does not depend on the variable to be summed out burglary can be moved network, outside the the relevant summation. part of Forthe example, expression if we were would to sum be out E first in the burglary network, the relevant part of the expression would be CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 55 f (E ) f (A,B, E) f (A) f (A) = f (A) f (A) f (E ) f (A,B, E). =.24.96.48.32 The only trick is to notice that any factor that does not depend on the variable to b out can be moved outside the summation. For example, if we were to sum out E f 2 (E ) f 3 (A,B, E) f 4 (A) f 5 (A) = f 4 (A) f 5 (A).. f 2 (E) f

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 56

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 57

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 58

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 59

CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 60

Outline Probability theory - basics Probabilistic Inference oinference by enumeration Conditional Independence Bayesian Networks Learning Probabilistic Models onaïve Bayes Classifier CSL 302 ARTIFICIAL INTELLIGENCE, INDIAN INSTITUTE OF TECHNOLOGY ROPAR 61