Bayes Rule Which is shorthand for: 10 Mar 2004 CS 3243 - Uncertainty.

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

Bayes Rule The product rule gives us two ways to factor a joint probability: Therefore, Why is this useful? –Can get diagnostic probability P(Cavity |
More probability CS151 David Kauchak Fall 2010 Some material borrowed from: Sara Owsley Sood and others.
Artificial Intelligence Uncertainty
Handling Uncertainty. Uncertain knowledge Typical example: Diagnosis. Consider data instances about patients: Can we certainly derive the diagnostic rule:
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.
Sample Midterm question. Sue want to build a model to predict movie ratings. She has a matrix of data, where for M movies and U users she has collected.
University College Cork (Ireland) Department of Civil and Environmental Engineering Course: Engineering Artificial Intelligence Dr. Radu Marinescu Lecture.
Handling Uncertainty. Uncertain knowledge Typical example: Diagnosis. Can we certainly derive the diagnostic rule: if Toothache=true then Cavity=true.
Ai in game programming it university of copenhagen Welcome to... the Crash Course Probability Theory Marco Loog.
Bayes Classification.
Sample Midterm question. Sue want to build a model to predict movie ratings. She has a matrix of data, where for M movies and U users she has collected.
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Methods in Computational Linguistics II Queens College Lecture 2: Counting Things.
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Feb 28 and March 13-15, 2012.
Handling Uncertainty. Uncertain knowledge Typical example: Diagnosis. Consider:  x Symptom(x, Toothache)  Disease(x, Cavity). The problem is that this.
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.
Bayes Nets and Probabilities
CHAPTER 13 Oliver Schulte Summer 2011 Uncertainty.
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes March 15and20, 2012.
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.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes March 20, 2012.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
Probability and naïve Bayes Classifier Louis Oliphant cs540 section 2 Fall 2005.
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
Bayesian Classification. Bayesian Classification: Why? A statistical classifier: performs probabilistic prediction, i.e., predicts class membership probabilities.
Uncertainty. Assumptions Inherent in Deductive Logic-based Systems All the assertions we wish to make and use are universally true. Observations of the.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
Review: Probability Random variables, events Axioms of probability Atomic events Joint and marginal probability distributions Conditional probability distributions.
Uncertainty Chapter 13. Outline Uncertainty Probability Syntax and Semantics Inference Independence and Bayes' Rule.
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.
Conditional Probability, Bayes’ Theorem, and Belief Networks CISC 2315 Discrete Structures Spring2010 Professor William G. Tanner, Jr.
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.
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.
Matching ® ® ® Global Map Local Map … … … obstacle Where am I on the global map?                                   
Text Classification and Naïve Bayes Formalizing the Naïve Bayes Classifier.
Introduction to Artificial Intelligence – Unit 7 Probabilistic Reasoning Course The Hebrew University of Jerusalem School of Engineering and Computer.
Computer Science cpsc322, Lecture 25
CMPT 726 Simon Fraser University CHAPTER 14 Oliver Schulte
Uncertainty Chapter 13 Copyright, 1996 © Dale Carnegie & Associates, Inc.
Where are we in CS 440? Now leaving: sequential, deterministic reasoning Entering: probabilistic reasoning and machine learning.
Uncertainty Chapter 13.
Conditional Probability, Bayes’ Theorem, and Belief Networks
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Uncertainty.
Uncertainty in Environments
CS 188: Artificial Intelligence Fall 2008
CS 188: Artificial Intelligence Fall 2007
CS 188: Artificial Intelligence Spring 2006
赵才荣 同济大学,电子与信息工程学院,智信馆410室
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Uncertainty Chapter 13.
Bayesian Networks CSE 573.
Representing Uncertainty
Uncertainty Chapter 13.
Presentation transcript:

Bayes Rule Which is shorthand for: 10 Mar 2004 CS 3243 - Uncertainty

Bayes' Rule Product rule P(ab) = P(a | b) P(b) = P(b | a) P(a)  Bayes' rule: P(a | b) = P(b | a) P(a) / P(b) or in distribution form P(Y|X) = P(X|Y) P(Y) / P(X) = αP(X|Y) P(Y) Useful for assessing diagnostic probability from causal probability: P(Cause|Effect) = P(Effect|Cause) P(Cause) / P(Effect) E.g., let M be meningitis, S be stiff neck: P(m|s) = P(s|m) P(m) / P(s) = 0.5 × 0.0002 / 0.05 = 0.0002 Note: posterior probability of meningitis still very small! 10 Mar 2004 CS 3243 - Uncertainty

Bayes' Rule and conditional independence P(Cavity | toothache  catch) = α · P(toothache  catch | Cavity) P(Cavity) = α · P(toothache | Cavity) P(catch | Cavity) P(Cavity) This is an example of a naïve Bayes model: P(Cause,Effect1, … ,Effectn) = P(Cause) πiP(Effecti|Cause) Total number of parameters is linear in n 10 Mar 2004 CS 3243 - Uncertainty

Naïve Bayes Classifier Calculate most probable function value Vmap = argmax P(vj| a1,a2, … , an) = argmax P(a1,a2, … , an| vj) P(vj) P(a1,a2, … , an) Naïve assumption: P(a1,a2, … , an) = P(a1)P(a2) … P(an) 10 Mar 2004 CS 3243 - Uncertainty

Naïve Bayes Algorithm NaïveBayesLearn(examples) For each target value vj P’(vj) ← estimate P(vj) For each attribute value ai of each attribute a P’(ai|vj) ← estimate P(ai|vj) ClassfyingNewInstance(x) vnb= argmax P’(vj) Π P’(ai|vj) aj ε x vj ε V 10 Mar 2004 CS 3243 - Uncertainty

An Example (due to MIT’s open coursework slides) f1 f2 f3 f4 y 1 1 R1(1,1) = 1/5: fraction of all positive examples that have feature 1 = 1 R1(0,1) = 4/5: fraction of all positive examples that have feature 1 = 0 R1(1,0) = 5/5: fraction of all negative examples that have feature 1 = 1 R1(0,0) = 0/5: fraction of all negative examples that have feature 1 = 0 Continue calculation of R2(1,0) … 10 Mar 2004 CS 3243 - Uncertainty

An Example R1 = 1/5, 4/5, 5/5, 0/5 R2 = 1/5, 4/5, 2/5, 3/5 (due to MIT’s open coursework slides) f1 f2 f3 f4 y 1 (1,1) (0,1) (1,0) (0,0) R1 = 1/5, 4/5, 5/5, 0/5 R2 = 1/5, 4/5, 2/5, 3/5 R3 = 4/5, 1/5, 1/5, 4/5 R4 = 2/5, 3/5, 4/5, 1/5 New x = <0, 0, 1, 1> S(1) = R1(0,1)*R2(0,1)*R3(1,1)*R4(1,1) = .205 S(0) = R1(0,0)*R2(0,0)*R3(1,0)*R4(1,0) = 0 S(1) > S(0), so predict v = 1. 10 Mar 2004 CS 3243 - Uncertainty