Computer Science cpsc322, Lecture 25

Slides:



Advertisements
Similar presentations
Probability: Review The state of the world is described using random variables Probabilities are defined over events –Sets of world states characterized.
Advertisements

Reasoning under Uncertainty: Marginalization, Conditional Prob., and Bayes Computer Science cpsc322, Lecture 25 (Textbook Chpt ) Nov, 6, 2013.
PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :
Reasoning under Uncertainty: Conditional Prob., Bayes and Independence Computer Science cpsc322, Lecture 25 (Textbook Chpt ) March, 17, 2010.
Marginal Independence and Conditional Independence Computer Science cpsc322, Lecture 26 (Textbook Chpt 6.1-2) March, 19, 2010.
CPSC 422 Review Of Probability Theory.
Probability.
Probability Review 1 CS479/679 Pattern Recognition Dr. George Bebis.
Uncertainty Chapter 13. Uncertainty Let action A t = leave for airport t minutes before flight Will A t get me there on time? Problems: 1.partial observability.
KI2 - 2 Kunstmatige Intelligentie / RuG Probabilities Revisited AIMA, Chapter 13.
1 Bayesian Reasoning Chapter 13 CMSC 471 Adapted from slides by Tim Finin and Marie desJardins.
Ai in game programming it university of copenhagen Welcome to... the Crash Course Probability Theory Marco Loog.
Probability and Information Copyright, 1996 © Dale Carnegie & Associates, Inc. A brief review (Chapter 13)
CPSC 322, Lecture 24Slide 1 Reasoning under Uncertainty: Intro to Probability Computer Science cpsc322, Lecture 24 (Textbook Chpt 6.1, 6.1.1) March, 15,
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Methods in Computational Linguistics II Queens College Lecture 2: Counting Things.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Feb 28 and March 13-15, 2012.
Uncertainty Chapter 13. Uncertainty Let action A t = leave for airport t minutes before flight Will A t get me there on time? Problems: 1.partial observability.
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes March 13, 2012.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
1 Chapter 13 Uncertainty. 2 Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
CSE PR 1 Reasoning - Rule-based and Probabilistic Representing relations with predicate logic Limitations of predicate logic Representing relations.
Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule Jim Little Uncertainty 2 Nov 3, 2014 Textbook §6.1.3.
Uncertainty. Assumptions Inherent in Deductive Logic-based Systems All the assertions we wish to make and use are universally true. Observations of the.
Reasoning under Uncertainty: Conditional Prob., Bayes and Independence Computer Science cpsc322, Lecture 25 (Textbook Chpt ) Nov, 5, 2012.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
Computer Science CPSC 322 Lecture 27 Conditioning Ch Slide 1.
Reasoning Under Uncertainty: Independence Jim Little Uncertainty 3 Nov 5, 2014 Textbook §6.2.
Reasoning Under Uncertainty: Independence CPSC 322 – Uncertainty 3 Textbook §6.2 March 21, 2011.
Uncertainty Let action A t = leave for airport t minutes before flight Will A t get me there on time? Problems: 1.partial observability (road state, other.
CSE 473 Uncertainty. © UW CSE AI Faculty 2 Many Techniques Developed Fuzzy Logic Certainty Factors Non-monotonic logic Probability Only one has stood.
Uncertainty Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Outline [AIMA Ch 13] 1 Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
Uncertainty & Probability CIS 391 – Introduction to Artificial Intelligence AIMA, Chapter 13 Many slides adapted from CMSC 421 (U. Maryland) by Bonnie.
Anifuddin Azis UNCERTAINTY. 2 Introduction The world is not a well-defined place. There is uncertainty in the facts we know: What’s the temperature? Imprecise.
Pattern Recognition Probability Review
Reasoning Under Uncertainty: Belief Networks
CS 188: Artificial Intelligence Spring 2007
Marginal Independence and Conditional Independence
Chapter 10: Using Uncertain Knowledge
Where are we in CS 440? Now leaving: sequential, deterministic reasoning Entering: probabilistic reasoning and machine learning.
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Reasoning Under Uncertainty: Conditioning, Bayes Rule & Chain Rule
CS 4/527: Artificial Intelligence
Uncertainty.
Uncertainty in AI.
Uncertainty in Environments
Representing Uncertainty
CSE-490DF Robotics Capstone
Professor Marie desJardins,
CS 188: Artificial Intelligence
Reasoning Under Uncertainty: Bnet Inference
CS 188: Artificial Intelligence Fall 2008
CS 188: Artificial Intelligence Fall 2007
Reasoning Under Uncertainty: Bnet Inference
CS 188: Artificial Intelligence Fall 2007
CS 188: Artificial Intelligence Fall 2008
CAP 5636 – Advanced Artificial Intelligence
Class #21 – Monday, November 10
Bayesian Reasoning Chapter 13 Thomas Bayes,
Uncertainty Chapter 13.
Probabilistic Reasoning
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Presentation transcript:

Computer Science cpsc322, Lecture 25 Reasoning under Uncertainty: Marginalization, Conditional Prob., and Bayes Computer Science cpsc322, Lecture 25 (Textbook Chpt 6.1.3.1-2) June, 13, 2017

Lecture Overview Recap Semantics of Probability Marginalization Conditional Probability Chain Rule Bayes' Rule

Recap: Possible World Semantics for Probabilities Probability is a formal measure of subjective uncertainty. Random variable and probability distribution Model Environment with a set of random vars Exhaustive and mutual exclusive Probability of a proposition f

Joint Distribution and Marginalization cavity toothache catch µ(w) T .108 F .012 .072 .008 .016 .064 .144 .576 Given a joint distribution, e.g. P(X,Y, Z) we can compute distributions over any smaller sets of variables Become fixed or prevented from moving cavity toothache P(cavity , toothache) T .12 F .08 .72

Joint Distribution and Marginalization cavity toothache catch µ(w) T .108 F .012 .072 .008 .016 .064 .144 .576 Given a joint distribution, e.g. P(X,Y, Z) we can compute distributions over any smaller sets of variables Become fixed or prevented from moving A. B. C. cavity catch P(cavity , catch) T .12 .18 F .08 .02 .72 … ….

Joint Distribution and Marginalization cavity toothache catch µ(w) T .108 F .012 .072 .008 .016 .064 .144 .576 Given a joint distribution, e.g. P(X,Y, Z) we can compute distributions over any smaller sets of variables Become fixed or prevented from moving A. B. C. cavity catch P(cavity , catch) T .12 .18 F .08 .02 .72 …

Why is it called Marginalization? cavity toothache P(cavity , toothache) T .12 F .08 .72 Toothache = T Toothache = F Cavity = T .12 .08 Cavity = F .72

Lecture Overview Recap Semantics of Probability Marginalization Conditional Probability Chain Rule Bayes' Rule Independence

Conditioning (Conditional Probability) We model our environment with a set of random variables. Assume have the joint, we can compute the probability of……. Are we done with reasoning under uncertainty? What can happen? Think of a patient showing up at the dentist office. Does she have a cavity?

Conditioning (Conditional Probability) Probabilistic conditioning specifies how to revise beliefs based on new information. You build a probabilistic model (for now the joint) taking all background information into account. This gives the prior probability. All other information must be conditioned on. If evidence e is all of the information obtained subsequently, the conditional probability P(h|e) of h given e is the posterior probability of h.

Conditioning Example Prior probability of having a cavity P(cavity = T) Should be revised if you know that there is toothache P(cavity = T | toothache = T) It should be revised again if you were informed that the probe did not catch anything P(cavity =T | toothache = T, catch = F) What about ? P(cavity = T | sunny = T)

How can we compute P(h|e) What happens in term of possible worlds if we know the value of a random var (or a set of random vars)? Some worlds are . The other become …. cavity toothache catch µ(w) µe(w) T .108 F .012 .072 .008 .016 .064 .144 .576 e = (cavity = T) Some are ruled out by the evidence So the others become more likely How much more likely?

How can we compute P(h|e) cavity toothache catch µ(w) µcavity=T (w) T .108 F .012 .072 .008 .016 .064 .144 .576 Some are ruled out by the evidence So the others become more likely How much more likely?

Semantics of Conditional Probability The conditional probability of formula h given evidence e is

Semantics of Conditional Prob.: Example e = (cavity = T) cavity toothache catch µ(w) µe(w) T .108 .54 F .012 .06 .072 .36 .008 .04 .016 .064 .144 .576 P(h | e) = P(toothache = T | cavity = T) =

Conditional Probability among Random Variables P(X | Y) = P(X , Y) / P(Y) P(X | Y) = P(toothache | cavity) = P(toothache  cavity) / P(cavity) Toothache = T Toothache = F Cavity = T .12 .08 Cavity = F .72 It expresses the probability of each possible value on the left given each possible value on the right Toothache = T Toothache = F Cavity = T Cavity = F

Product Rule P(X1, …,Xn) = = P(X1,...,Xt) P(Xt+1…. Xn | X1,...,Xt) Definition of conditional probability: P(X1 | X2) = P(X1 , X2) / P(X2) Product rule gives an alternative, more intuitive formulation: P(X1 , X2) = P(X2) P(X1 | X2) = P(X1) P(X2 | X1) Product rule general form: P(X1, …,Xn) = = P(X1,...,Xt) P(Xt+1…. Xn | X1,...,Xt) if P(b) > 0

Chain Rule Product rule general form: P(X1, …,Xn) = = P(X1,...,Xt) P(Xt+1…. Xn | X1,...,Xt) Chain rule is derived by successive application of product rule: P(X1, … Xn-1 , Xn) = = P(X1,...,Xn-1) P(Xn | X1,...,Xn-1) = P(X1,...,Xn-2) P(Xn-1 | X1,...,Xn-2) P(Xn | X1,...,Xn-1) = …. = P(X1) P(X2 | X1) … P(Xn-1 | X1,...,Xn-2) P(Xn | X1,.,Xn-1) = ∏ni= 1 P(Xi | X1, … ,Xi-1) if P(b) > 0

Chain Rule: Example P(cavity , toothache, catch) = P(toothache, catch, cavity) = if P(b) > 0 In how many other ways can this joint be decomposed using the chain rule? A. 4 B. 1 C. 8 D. 0

Chain Rule: Example P(cavity , toothache, catch) = P(toothache, catch, cavity) = if P(b) > 0

Lecture Overview Recap Semantics of Probability Marginalization Conditional Probability Chain Rule Bayes' Rule Independence

Using conditional probability Often you have causal knowledge (forward from cause to evidence): For example P(symptom | disease) P(light is off | status of switches and switch positions) P(alarm | fire) In general: P(evidence e | hypothesis h) ... and you want to do evidential reasoning (backwards from evidence to cause): P(disease | symptom) P(status of switches | light is off and switch positions) P(fire | alarm) In general: P(hypothesis h | evidence e)

Bayes Rule By definition, we know that : We can rearrange terms to write But From (1) (2) and (3) we can derive Bayes Rule

Example for Bayes rule  

Example for Bayes rule   A. 0.999 B. 0.9 C. 0.0999 D. 0.1

Example for Bayes rule  

Learning Goals for today’s class You can: Given a joint, compute distributions over any subset of the variables Prove the formula to compute P(h|e) Derive the Chain Rule and the Bayes Rule CPSC 322, Lecture 4

Next Class Assignments Marginal Independence Conditional Independence Assignments Assignment 3 has been posted : due jone 20th

Plan for this week Probability is a rigorous formalism for uncertain knowledge Joint probability distribution specifies probability of every possible world Probabilistic queries can be answered by summing over possible worlds For nontrivial domains, we must find a way to reduce the joint distribution size Independence (rare) and conditional independence (frequent) provide the tools

Conditional probability (irrelevant evidence) New evidence may be irrelevant, allowing simplification, e.g., P(cavity | toothache, sunny) = P(cavity | toothache) We say that Cavity is conditionally independent from Weather (more on this next class) This kind of inference, sanctioned by domain knowledge, is crucial in probabilistic inference Not