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

Similar documents
Probabilistic Graphical Models and Bayesian Networks. Artificial Intelligence Bert Huang Virginia Tech

Uncertainty and Bayesian Networks

last two digits of your SID

Probabilistic Reasoning. (Mostly using Bayesian Networks)

Bayesian networks. Chapter Chapter

Artificial Intelligence Bayes Nets: Independence

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

Bayes Nets: Independence

Probabilistic Reasoning Systems

CS 5522: Artificial Intelligence II

Bayesian networks. Chapter 14, Sections 1 4

Bayesian Networks Representation

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

CS 188: Artificial Intelligence. Bayes Nets

Directed Graphical Models

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

PROBABILISTIC REASONING SYSTEMS

Directed Graphical Models or Bayesian Networks

Quantifying uncertainty & Bayesian networks

CS 188: Artificial Intelligence Fall 2009

Machine Learning Lecture 14

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

Introduction to Artificial Intelligence. Unit # 11

School of EECS Washington State University. Artificial Intelligence

Bayesian Approaches Data Mining Selected Technique

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

Graphical Models - Part I

Conditional Independence and Factorization

Bayesian Networks Introduction to Machine Learning. Matt Gormley Lecture 24 April 9, 2018

CS 188: Artificial Intelligence Spring Announcements

Statistical Approaches to Learning and Discovery

Inference in Bayesian networks

Bayesian Belief Network

Probabilistic Machine Learning

Intelligent Systems (AI-2)

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

Stochastic inference in Bayesian networks, Markov chain Monte Carlo methods

Introduction to Bayes Nets. CS 486/686: Introduction to Artificial Intelligence Fall 2013

Intelligent Systems: Reasoning and Recognition. Reasoning with Bayesian Networks

Bayesian Networks. Machine Learning, Fall Slides based on material from the Russell and Norvig AI Book, Ch. 14

Reasoning Under Uncertainty: More on BNets structure and construction

Artificial Intelligence Methods. Inference in Bayesian networks

CSEP 573: Artificial Intelligence

Probability. CS 3793/5233 Artificial Intelligence Probability 1

Bayesian Networks BY: MOHAMAD ALSABBAGH

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

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

Probabilistic Graphical Networks: Definitions and Basic Results

Artificial Intelligence Bayesian Networks

Lecture 8. Probabilistic Reasoning CS 486/686 May 25, 2006

Intelligent Systems (AI-2)

Lecture 4 October 18th

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

Chris Bishop s PRML Ch. 8: Graphical Models

Based on slides by Richard Zemel

Bayesian Networks (Part II)

Review: Directed Models (Bayes Nets)

Probabilistic Models

Artificial Intelligence

Bayesian Machine Learning

Probabilistic Graphical Models (I)

CS 343: Artificial Intelligence

University of Washington Department of Electrical Engineering EE512 Spring, 2006 Graphical Models

CS 188: Artificial Intelligence Spring Announcements

Review: Bayesian learning and inference

Rapid Introduction to Machine Learning/ Deep Learning

Y. Xiang, Inference with Uncertain Knowledge 1

Informatics 2D Reasoning and Agents Semester 2,

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

Product rule. Chain rule

Directed and Undirected Graphical Models

Fusion in simple models

4.1 Notation and probability review

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

Probabilistic Representation and Reasoning

Uncertainty and knowledge. Uncertainty and knowledge. Reasoning with uncertainty. Notes

CS Lecture 3. More Bayesian Networks

Brief Intro. to Bayesian Networks. Extracted and modified from four lectures in Intro to AI, Spring 2008 Paul S. Rosenbloom

Bayesian networks (1) Lirong Xia

Inference in Bayesian Networks

Bayesian Networks aka belief networks, probabilistic networks. Bayesian Networks aka belief networks, probabilistic networks. An Example Bayes Net

Introduction to Probabilistic Reasoning. Image credit: NASA. Assignment

Bayesian Learning. Instructor: Jesse Davis

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

15-780: Graduate Artificial Intelligence. Bayesian networks: Construction and inference

CS 730/730W/830: Intro AI

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

Probabilistic Graphical Models

Bayesian Networks. instructor: Matteo Pozzi. x 1. x 2. x 3 x 4. x 5. x 6. x 7. x 8. x 9. Lec : Urban Systems Modeling

Lecture 6: Graphical Models

Representation. Stefano Ermon, Aditya Grover. Stanford University. Lecture 2

CSC 412 (Lecture 4): Undirected Graphical Models

Reasoning Under Uncertainty: More on BNets structure and construction

Conditional Independence

Undirected Graphical Models

1. what conditional independencies are implied by the graph. 2. whether these independecies correspond to the probability distribution

Variable Elimination: Algorithm

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

TDT70: Uncertainty in Artificial Intelligence. Chapter 1 and 2

Reasoning Under Uncertainty

Transcription:

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

Outline Logical inference and probabilistic inference Independence and conditional independence Bayes Nets Semantics of Bayes Nets How to construct a Bayes net Conditional Independence in Bayes nets Variable elimination algorithm Naïve Bayes

Logical inference vs. probabilistic inference Problem: KB = α? Model checking can determine entailment. P1 P2 P3 KB α T T T T T F T? F F T T? F F F T? Is M(KB) a subset of M(α)? # of models: 2 n, n=3 here. Problem: P(X,Y)=? Or P(X Y)=? Full joint probability distribution can be used to answer any query. X Y Z P(X,Y,Z) x 1 y 1 z 1 0.3 x 1 x 1 Z 2 0.25 X h y m z k-1 0.1 x h y m Z k 0.05 # of parameters: hmk > 2 n How to answer the query?

Inference given full joint probability distribution Joint probability P(x,y) = P(x, y, z) z (Marginalization) Conditional probability P(x y) = P(x,y} = z P(x,y,z) P(y) P(x,y,z) x,z (definition + marginalization) Or P(x y) = α P(x, y, z) z (normalization) α = x,z 1 P(x,y,z) Time and space: O(2 n )

Independence and conditional independence Independence of two events Events a and b are independent if knowing b tells us nothing about a P(a b) = P(a) or P(a b) = P(a)P(b) Independence of two random variables Random variable X and Y are independent if for all x,y, P(X=x, Y=y) = P(X=x)P(Y=y) Shorthand: P(X,Y)=P(X)P(Y) Conditional independence X and Y are conditionally independent given Z if P(X,Y Z)=P(X Z)P(Y Z)

Bayesian Network/Bayes Net (1) Semantics Nodes are random variables Edges are directed. Edge X --> Y indicates x has a direct influence on Y There is no cycles Each node is associated with a conditional probability distribution: P(x Parents(x)) How to construct a Bayes Net? Topology comes from human expert Conditional probabilities: learned from data

Bayesian Network/Bayes Net(2) Conditional independence in Bayes Nets A node is conditionally independent of non-descendants given its parents. A node conditionally independent of all other nodes given its Markov blanket. A Markov blanked of a node is composed of its parents, its children, and its children s other parents.

Bayesian Network/Bayes Net(3) Bayes nets represent the full joint probability n P(X 1, X 2,, X n ) = i P(X i Parents(X i )) Exact inference (P(b j,m) =? example in the textbook) P(b, j,m) = α P b, j, m = α P(b, j, m, e, a) e,a = α P b P e P a e, b P j a P(m a) e,a = α P(b) e P e a P a e. b P j a P(m a)

Variable Elimination Algorithm (1) Variable elimination algorithm P(b, j,m) = α P b e P e a P a e. b P j a P m a g 1 (e,b) = P a e. b P a j a P m a g 2 (b) = P e e g 1 (e,b) g 3 (b) = P(b) g 2 (b) Define and evaluate function for each summation from right to left. Evaluate once and store the values to be used later. Normalize.

Time and space: Variable elimination algorithm (2) linear in terms of the size of Bayes net for singly connected networks. Exponential for multiply connected networks. Singly-connected networks vs Multiply-connected networks In singly-connected networks, also called polytrees, there is at most one undirected path between any two nodes. In mutliply-connected networks, there could be 2 or more undirected paths between 2 nodes.

Naïve Bayes Naïve Bayes: A special case of Bayes net: one parent node and the rest are its children. Random variables: One cause and multiple effects. Assume that all effects are conditionally independent given the cause. Very tractable. Can be used for classification: Naïve Bayes classifier.

Review questions: true/false 1. Given the full joint probability distribution, we can answer most, but not all, inference queries. 2. A Bayes net completely and implicitly defines the full joint probability distribution of all random variables in a probabilistic model. 3. In a Bayes net, a node is conditionally independent of all other nodes given its parents. 4. In a Bayes net, a node is conditionally independent of all other nodes given its Markov blanket. 5. The Markov blanket of a node consists of its parents and its children.

Review questions: true/false (cont d) 6. Variable elimination algorithm can be used to do exact inference in any Bayes net. 7. For any Bayes net, variable elimination algorithm takes linear time and space in terms of the size of the Bayes net. 8. In singly connect networks, also called polytrees, there is at most one indirect path between any two nodes. 9. Bayes rule is very useful because it provides a way to calculate the conditional probability of a hidden variable given some evidence, which is usually hard to estimate directly.

Announcement & Reminder W2 is due today --- Turn in hard copies in class W1 will be returned after class today W3 has been released and is due on Tuesday Nov. 10 th --- Turn in hard copies in class