Probabilistic Reasoning in AI COMP-526

Similar documents
Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Recall from last time: Conditional probabilities. Lecture 2: Belief (Bayesian) networks. Bayes ball. Example (continued) Example: Inference problem

Bayesian belief networks

Course Introduction. Probabilistic Modelling and Reasoning. Relationships between courses. Dealing with Uncertainty. Chris Williams.

Uncertainty. Russell & Norvig Chapter 13.

Bayesian Networks BY: MOHAMAD ALSABBAGH

Introduction to Artificial Intelligence. Unit # 11

Brief Review of Probability

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

Grundlagen der Künstlichen Intelligenz

Lecture 9: Naive Bayes, SVM, Kernels. Saravanan Thirumuruganathan

Probabilistic Reasoning. (Mostly using Bayesian Networks)

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

Discrete Probability and State Estimation

Quantifying uncertainty & Bayesian networks

An AI-ish view of Probability, Conditional Probability & Bayes Theorem

10/18/2017. An AI-ish view of Probability, Conditional Probability & Bayes Theorem. Making decisions under uncertainty.

COMP9414/ 9814/ 3411: Artificial Intelligence. 14. Uncertainty. Russell & Norvig, Chapter 13. UNSW c AIMA, 2004, Alan Blair, 2012

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

Probabilistic representation and reasoning

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

Uncertainty and Bayesian Networks

Probabilistic Reasoning

Uncertainty. Chapter 13

Probabilistic representation and reasoning

Pengju

Graphical Models - Part I

Artificial Intelligence Uncertainty

Introduction to Machine Learning

Modeling and reasoning with uncertainty

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

Artificial Intelligence

CS 4649/7649 Robot Intelligence: Planning

COMP9414: Artificial Intelligence Reasoning Under Uncertainty

Directed Graphical Models

Probability. Machine Learning and Pattern Recognition. Chris Williams. School of Informatics, University of Edinburgh. August 2014

Bayesian belief networks. Inference.

Recitation 2: Probability

Pengju XJTU 2016

Uncertainty. Chapter 13

Lecture 1: Probability Fundamentals

Y. Xiang, Inference with Uncertain Knowledge 1

Probabilistic Reasoning Systems

Introduction to Stochastic Processes

Introduction to Probabilistic Reasoning. Image credit: NASA. Assignment

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

Probability. CS 3793/5233 Artificial Intelligence Probability 1

CS 188: Artificial Intelligence Fall 2009

Uncertainty. Outline

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

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

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

Review of probability. Nuno Vasconcelos UCSD

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2016

Uncertain Knowledge and Bayes Rule. George Konidaris

CS 188: Artificial Intelligence Spring Today

PROBABILISTIC REASONING SYSTEMS

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

COMP5211 Lecture Note on Reasoning under Uncertainty

Deep Learning for Computer Vision

Bayesian Networks. Motivation

Logic, Knowledge Representation and Bayesian Decision Theory

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2014

Discrete Probability and State Estimation

15-388/688 - Practical Data Science: Basic probability. J. Zico Kolter Carnegie Mellon University Spring 2018

Mobile Robotics II: Simultaneous localization and mapping

CS 188: Artificial Intelligence Spring Announcements

Outline. Uncertainty. Methods for handling uncertainty. Uncertainty. Making decisions under uncertainty. Probability. Uncertainty

Computational Genomics

Probabilistic Representation and Reasoning

n How to represent uncertainty in knowledge? n Which action to choose under uncertainty? q Assume the car does not have a flat tire

Aarti Singh. Lecture 2, January 13, Reading: Bishop: Chap 1,2. Slides courtesy: Eric Xing, Andrew Moore, Tom Mitchell

Reasoning under Uncertainty: Intro to Probability

Uncertainty. Outline. Probability Syntax and Semantics Inference Independence and Bayes Rule. AIMA2e Chapter 13

Preliminary Statistics Lecture 2: Probability Theory (Outline) prelimsoas.webs.com

Probabilistic Robotics

Uncertainty. Chapter 13. Chapter 13 1

Bayesian networks. Chapter 14, Sections 1 4

Probabilistic Reasoning. Kee-Eung Kim KAIST Computer Science

CS6220: DATA MINING TECHNIQUES

CS6220: DATA MINING TECHNIQUES

Artificial Intelligence Bayesian Networks

CMPSCI 240: Reasoning about Uncertainty

CS 561: Artificial Intelligence

Single Maths B: Introduction to Probability

Basic Probability and Decisions

Informatics 2D Reasoning and Agents Semester 2,

CS 5522: Artificial Intelligence II

Probabilistic Models

Bayesian Methods in Artificial Intelligence

Machine Learning. CS Spring 2015 a Bayesian Learning (I) Uncertainty

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

Basic Probability and Statistics

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

Bayesian Networks Inference with Probabilistic Graphical Models

Introduction to Machine Learning

CS 5100: Founda.ons of Ar.ficial Intelligence

Introduction to Probability and Statistics (Continued)

Introduction: MLE, MAP, Bayesian reasoning (28/8/13)

Introduction to Artificial Intelligence (AI)

Transcription:

Probabilistic Reasoning in AI COMP-526 Instructors: Amin Atrash and Marc Gendron-Bellemare Email: aatras@cs.mcgill.ca and mgendr12@cs.mcgill.ca As: Philipp Keller Email: pkelle@cs.mcgill.ca Administrative details Course overview Outline Modeling uncertainty using probabilities Decision making under uncertainty Random variables and probabilities Conditional probability and Bayes rule Class web page http://www.cs.mcgill.ca/ aatras/comp526 January 3, 2007 1 COMP-526 Lecture 1 January 3, 2007 2 COMP-526 Lecture 1 Class reading Selected chapters from the following books: M. Jordan, Introduction to Graphical Models (copies will be distributed, pending approval) D.J.C.MacKay, Information theory, inference and learning algorithms S. Russell and P. Norvig: Artificial intelligence: A modern approach D. Koller and N. riedman, Bayesian Networks and Beyond (copies will be distributed, pending approval) Evaluation mechanisms Eight assignments, lowest grade is dropped (70%) Problems related to the class material Programming exercises wo written examinations (15% each) Class participation and discussions (up to 5% extra credit) R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduction Class notes: posted on the web page January 3, 2007 3 COMP-526 Lecture 1 January 3, 2007 4 COMP-526 Lecture 1

Intelligent systems have to deal with uncertainty! E.g. Predicting the behavior of other people (girlfriend / boyfriend / kids) Partial knowledge of the state of the world E.g. We don t know exactly what is going on in their mind Noisy observations E.g. Smiling or frowning, making faces Inherent stochasticity E.g. oday she likes the DVD, tomorrow she does not! Phenomena that are not covered by our models E.g. Level of hormones, which depend on food, exercise,... How do we deal with uncertainty? In this course, we will focus on building models that capture the uncertainty about the state of the world, the dynamics of the system and about our observations. he model will then be used to reason about the world, and about the effects of different actions. Important questions: What language should we use? What is the meaning of our model? What queries can the model answer? What is the method for answering queries? How do we construct a model? Do we need to ask an expert, or can the model be learned from data? January 3, 2007 5 COMP-526 Lecture 1 January 3, 2007 6 COMP-526 Lecture 1 he dawning of the age of stochasticity or over two millennia, Aristotle s logic has ruled over the thinking AI approaches for dealing with uncertainty Default reasoning: believe something until evidence to the contrary is found Rules with fudge factors uzzy logic: allows events to be sort of true Probability of western intellectuals. All precise theories, all scientific models, even models of the process of thinking itself, have in principle conformed to the straight-jacket of logic. But from its shady beginnings devising gambling strategies and counting corpses in medieval London, probability theory and statistical inference now emerge as better foundations for scientific models, especially those of the process of thinking, and as essential ingredients of theoretical mathematics, even the foundations of mathematics itself. We propose that this sea of change in our perspective will affect virtually all of mathematics in the next century. David Mumford, 1999 January 3, 2007 7 COMP-526 Lecture 1 January 3, 2007 8 COMP-526 Lecture 1

Probability A well-known and well-understood framework for dealing with uncertainty Has a clear semantics Provides principled answers for: Combining evidence Predictive and diagnostic reasoning Incorporation of new evidence Can be learned from data Arguably intuitive to human experts Representing probabilities efficiently Naive representations of probability are hopelessly inefficient E.g. consider patients described by several attributes: Background: age, gender, medical history,... Symptoms: fever, blood pressure, headache,... Diseases: pneumonia, hepatitis,... A probability distribution needs to assign a number to each combination of values of these attributes! Real examples involve hundreds of attributes Key idea: exploit regularities and structure of the domain We will focus mainly on exploiting conditional independence properties January 3, 2007 9 COMP-526 Lecture 1 January 3, 2007 10 COMP-526 Lecture 1 Probabilistic reasoning Example: A Bayesian (belief) network Burglary JohnCalls P(B).001 Alarm A P(J).90.05 Earthquake B E P(A).95.94.29.001 MaryCalls A P(E).002 P(M).70.01 During the first half of the course we will study: Syntax and semantics of graphical models for representing probability distributions: Bayesian networks (built on top of directed graphs) Markov networks (built on top of undirected graphs) How to efficiently answer queries in such networks How to learn Bayesian and Markov networks from data How to incorporate relational data into Bayesian networks How to model time sequences using graphical models Hidden Markov Models (HMMs) Dynamic Bayesian Networks (DBNs) January 3, 2007 11 COMP-526 Lecture 1 January 3, 2007 12 COMP-526 Lecture 1

ielded applications Decision making Expert systems Medical diagnosis (e.g. Pathfinder) ault diagnosis (e.g. jet-engines) Monitoring Space shuttle engines (Vista project) reeway traffic Sequence analysis and classification Speech recognition Biological sequences Information access Collaborative filtering Information retrieval January 3, 2007 13 COMP-526 Lecture 1 Suppose you believe the following: p(girlfriend likes erminator DVD...) = 0.04 p(girlfriend likes cashmere sweater...) = 0.70 p(girlfriend likes diamond necklace...) = 0.9999 Which action should you choose? Depends on preferences for making her happy vs. your own interest vs. cost Probability is not enough for choosing actions We also need to consider risks and payoffs Utility theory is used to represent and infer preferences Decision theory = utility theory + probability theory January 3, 2007 14 COMP-526 Lecture 1 Decision making Suppose you believe the following: p(girlfriend likes erminator DVD...) = 0.04 p(girlfriend likes cashmere sweater...) = 0.70 p(girlfriend likes diamond necklace...) = 0.9999 Which action should you choose? Depends on preferences for making her happy vs. your own interest vs. cost Probability is not enough for choosing actions We also need to consider risks and payoffs Utility theory is used to represent and infer preferences Practical decision making We need to represent both probabilities and utilities he expected utility of actions is computed given evidence and past actions A rational agent should choose the action that maximizes expected utility Value of information: is it worth acquiring more information in order to choose better actions? Decision theory = utility theory + probability theory January 3, 2007 15 COMP-526 Lecture 1 January 3, 2007 16 COMP-526 Lecture 1

ielded applications Decision making In the second half of the course we will study: Utility theory Models of repeated decision: Markov Decision Processes Partially Observable Markov Decision Processes Robot control Control of complex, chaotic systems (e.g. helicopters) Game playing Inventory management Allocation of bandwidth in cell phone networks Network routing... January 3, 2007 17 COMP-526 Lecture 1 January 3, 2007 18 COMP-526 Lecture 1 What is a random variable? Something that has not happened yet: Will a tossed coin come up heads or tails? Will the cancer recur or not? Something you do not know... Did the coin come up heads or tails? How did the protein fold?... because you have not/cannot observe it directly or compute it definitively from what you have observed. Discrete random variables A discrete random variable X takes values from a discrete set Ω X, called the domain or sample space of X. X = roll of a die; Ω X = {1,2, 3,4, 5,6}. X = nucleotide a position 1, chromosome 1, in a particular person; Ω X = {A,C, G, }. X = does a customer buy a new V or not An event is a subset of Ω X. e 1 = {1} corresponds to a die roll of 1 e 2 = {1,3,5} corresponds to an odd value for the roll January 3, 2007 19 COMP-526 Lecture 1 January 3, 2007 20 COMP-526 Lecture 1

Probabilities or a discrete r.v. X, each value x Ω X has a probability of occurring, which we will denote by p(x = x) or, more simply, p(x). p(x) denotes the probability distribution function (p.d.f.) for X. It can be thought of as a table. x 1 2 3 4 5 6 p(x) 1/6 1/6 1/6 1/6 1/6 1/6 Basic properties: 0 p(x) 1, x Ω X P x Ω X p(x) = 1 Cumulative distribution functions If X takes values from an ordered set Ω X (such as integers) then the cumulative distribution function is c.d.f.(x) = p(x x) = X p(x ) x x or example, if X is the roll of a die, then: x 1 2 3 4 5 6 p(x) 1/6 1/6 1/6 1/6 1/6 1/6 c.d.f.(x) 1/6 2/6 3/6 4/6 5/6 1 January 3, 2007 21 COMP-526 Lecture 1 January 3, 2007 22 COMP-526 Lecture 1 Mean and variance If Ω X is a set of numbers, then the expected value or mean of X is he variance of X is E(X) = X x Ω X xp(x) V ar(x) = E(X 2 ) (E(X)) 2 0 1 0 1 = @ X x 2 p(x) A @ X xp(x) A x Ω X x Ω X he standard deviation of X is the square root of the variance Example: If X is a die roll, then the mean value is 3.5 and the standard deviation is approximately 3.4157. January 3, 2007 23 COMP-526 Lecture 1 2 Continuous random variables A continuous random variable X takes real values. X = expression level for a gene as reported by a microarray. X = price for which a house will sell X = size of a tumor Any continuous r.v. X has a cumulative distribution function c.d.f.(x) = p(x x) with the following properties: c.d.f.(x) is a non-decreasing function; c.d.f.(x) c.d.f.(x ) whenever x x. lim x c.d.f(x) = 0. lim x + c.d.f.(x) = 1. January 3, 2007 24 COMP-526 Lecture 1

Probability density functions If c.d.f(x) is continuous and differentiable then its derivative is the probability density function, analogous to the probability distribution function of a discrete r.v. Properties: d c.d.f(x) = p(x) dx 0 p(x) <. Note that p(x) > 1 is allowed, unlike for discrete r.v. s. R p(x)dx = 1, similar to discrete r.v. s. x Example: Gaussian random variables X N(µ, σ) has mean µ and standard deviation σ. graph formula 1 0.5 c.d.f. 0 4 2 0 2 4? 0.4 0.3 0.2 0.1 p.d.f. 0 4 2 0 2 4 1 2πσ e (x µ)2 2σ 2 January 3, 2007 25 COMP-526 Lecture 1 January 3, 2007 26 COMP-526 Lecture 1 Not all continuous r.v. s have p.d.f. s Suppose X equal to zero with probability 1 and otherwise is 2 distributed according to N(0, 1). hen the c.d.f. is 8 < c.d.f(x) = : 1 2 f(x) x < 0 1 2 f(x) + 1 2 x 0 where f(x) denotes the c.d.f. of a N(0, 1) r.v. 1 0.5 0 4 2 0 2 4 Mean and variance We will almost always restrict our attention to continuous r.v. s with p.d.f. s. hen, the expected value is defined as Z E(X) = xp(x)dx Variance is V ar(x) = E(X 2 ) (E(X)) 2 Z Z = x 2 p(x)dx x x x «2 xp(x)dx here is no p.d.f. because of the discrete jump in the c.d.f. January 3, 2007 27 COMP-526 Lecture 1 January 3, 2007 28 COMP-526 Lecture 1

Beliefs We will use probability in order to describe the world and the existing uncertainties Beliefs (also called Bayesian or subjective probabilities) relate logical propositions to the current state of knowledge Beliefs are subjective assertions about the world, given one s state of knowledge E.g. p(some day AI agents will rule the world) = 0.2 reflects a personal belief, based on one s state of knowledge about current AI, technology trends, etc. Different agents may hold different beliefs Prior (unconditional) beliefs denote belief prior to the arrival of any new evidence. Defining probabilistic models We define the world as a set of random variables Ω = {X 1... X n }. A probabilistic model is an encoding of probabilistic information that allows us to compute the probability of any event in the world January 3, 2007 29 COMP-526 Lecture 1 January 3, 2007 30 COMP-526 Lecture 1 Example Let X 1 = true iff a rolled die comes out even. Let X 2 = true iff the same rolled die comes out odd. Example Let X 1 = true iff a rolled die comes out even. Let X 2 = true iff the same rolled die comes out odd. p(x 1 = true) = p(x 1 = false) = 1 2 p(x 1 = true) = p(x 1 = false) = 1 2 p(x 2 = true) = p(x 2 = false) = 1 2 What is the probability p(x 1 = true and X 2 = true)? We know it is zero. But there is no way of knowing just from p(x 1 ) and p(x 2 ). here are several ways we can specify the relationships between variables. hey all come down to specifying joint probability distributions/densities. p(x 2 = true) = p(x 2 = false) = 1 2 What is the probability p(x 1 = true and X 2 = true)? We know it is zero, but there is no way of knowing just from p(x 1 ) and p(x 2 )! here are several ways to specify the relationships between variables. hey all come down to specifying joint probability distributions/densities. January 3, 2007 31 COMP-526 Lecture 1 January 3, 2007 32 COMP-526 Lecture 1

Joint probabilities When considering r.v. s X 1, X 2,..., X m, the joint probability function specifies the probability of every combination of values. p(x 1 = x 1 and X 2 = x 2 and... and X m = x m ) When the r.v. s are discrete, the joint probability can be viewed as a table. even=true even=false odd=true 0 1/2 odd=false 1/2 0 Marginal probabilities Given r.v. s X 1, X 2,... X m with joint probability p(x 1, x 2,..., x m ), the marginal probability of a r.v. X i is obtained by summing (or integrating) over all possible values of the other r.v. s: X p(x i = x i ) = p(x 1, x 2,..., x m ) x 1,x 2,...,x i 1,x i+1,...,x m die=1 2 3 4 5 6 p(even) even=true 0 1/6 0 1/6 0 1/6 1/2 even=false 1/6 0 1/6 0 1/6 0 1/2 p(die) 1/6 1/6 1/6 1/6 1/6 1/6 A similar definition holds for any subset of r.v. s. January 3, 2007 33 COMP-526 Lecture 1 January 3, 2007 34 COMP-526 Lecture 1 A simple probabilistic model We divide the world into a set of elementary, mutually exclusive events, called states E.g. If the world is described by two binary variables A, B, a state will be a complete assignment of truth values for A and B. A joint probability distribution function provides the probabilities for each state Probabilities for other events which are not listed explicitly are computed by marginalization. his process is called inference. Inference using joint distributions E.g. Suppose Happy and Rested are the random variables: Happy = 1 Happy = 0 Rested = 1 0.05 0.1 Rested = 0 0.6 0.25 he unconditional probability of any proposition is computable as the sum of entries from the full joint distribution E.g. p(happy = 1) = p(happy = 1, Rested = 1) + p(happy = 1, Rested = 0) = 0.65 January 3, 2007 35 COMP-526 Lecture 1 January 3, 2007 36 COMP-526 Lecture 1

Independent random variables Example Suppose we consider medical diagnosis, and there are 100 different symptoms and test results that the doctor could consider. A patient comes in complaining of fever, dry cough and chest pains. he doctor wants to compute the probability of pneumonia. he probability table has >= 2 100 entries! or computing the probability of a disease, we have to sum out over 97 hidden variables! wo random variables X and Y are independent, denoted X Y, if and only if p(x = x and Y = y) = p(x = x)p(y = y) for all values x and y. his is often abbreviated as p(x, Y ) = p(x)p(y ). If this requirement is satisfied, for binary variables, only n numbers are necessary to represent the joint distribution, instead of 2 n! But this is a very strict requirement, almost never met. January 3, 2007 37 COMP-526 Lecture 1 January 3, 2007 38 COMP-526 Lecture 1 Conditional probablity he basic statements in the Bayesian framework talk about conditional probabilities p(x = x Y = y) denotes the belief that event X = x occurs given that event Y = y has occurred with absolute certainty. E.g., p(die=1 odd = true) = 1/3. E.g., p(die=1 odd = false) = 0. he conditional probability can be defined (and computed) as p(x y) = p(x, y) p(y) as long as p(y) > 0. An alternative formulation is given by the product rule: Bayes Rule Bayes rule is a reformulation of the product rule:. p(x y) = p(y x)p(x) p(y) Another alternative formulation is the complete probability formula: p(x) = X y p(x y)p(y), where y form a set of exhaustive and mutually exclusive events. p(x, y) = p(x y)p(y) = p(y x)p(x) January 3, 2007 39 COMP-526 Lecture 1 January 3, 2007 40 COMP-526 Lecture 1

Chain rule Chain rule is derived by successive application of the product rule: p(x 1,...,X n ) = = p(x 1,...,X n 1 )p(x n X 1,..., X n 1 ) = p(x 1,...,X n 2 )p(x n 1 X 1,..., X n 2 )p(x n X 1,..., X n 1 ) =... ny = p(x i X 1,..., X i 1 ) i=1 Why conditional probabilities? Conditional probabilities are interesting because we often observe something and want to infer something/make a guess about something unobserved but related. p(cancer recurs tumor measurements) p(gene expressed > 1.3 transcription factor concentrations) p(collision to obstacle sensor readings) p(word uttered sound wave)... January 3, 2007 41 COMP-526 Lecture 1 January 3, 2007 42 COMP-526 Lecture 1