Bayes network inference  A general scenario:  Query variables: X  Evidence (observed) variables and their values: E = e  Unobserved variables: Y 

Slides:



Advertisements
Similar presentations
Variational Methods for Graphical Models Micheal I. Jordan Zoubin Ghahramani Tommi S. Jaakkola Lawrence K. Saul Presented by: Afsaneh Shirazi.
Advertisements

Reasoning under Uncertainty: Marginalization, Conditional Prob., and Bayes Computer Science cpsc322, Lecture 25 (Textbook Chpt ) Nov, 6, 2013.
Belief networks Conditional independence Syntax and semantics Exact inference Approximate inference CS 460, Belief Networks1 Mundhenk and Itti Based.
BIOL 301 Guest Lecture: Reasoning Under Uncertainty (Intro to Bayes Networks) Simon D. Levy CSCI Department 8 April 2010.
Exact Inference in Bayes Nets
1 Bayesian Networks Slides from multiple sources: Weng-Keen Wong, School of Electrical Engineering and Computer Science, Oregon State University.
Homework 3: Naive Bayes Classification
Slide 1 Reasoning Under Uncertainty: More on BNets structure and construction Jim Little Nov (Textbook 6.3)
Probabilistic Reasoning (2)
Pearl’s Belief Propagation Algorithm Exact answers from tree-structured Bayesian networks Heavily based on slides by: Tomas Singliar,
CSCI 121 Special Topics: Bayesian Networks Lecture #3: Multiply-Connected Graphs and the Junction Tree Algorithm.
GS 540 week 6. HMM basics Given a sequence, and state parameters: – Each possible path through the states has a certain probability of emitting the sequence.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) March, 16, 2009.
Overview Full Bayesian Learning MAP learning
M.I. Jaime Alfonso Reyes ´Cortés.  The basic task for any probabilistic inference system is to compute the posterior probability distribution for a set.
Reasoning under Uncertainty: Conditional Prob., Bayes and Independence Computer Science cpsc322, Lecture 25 (Textbook Chpt ) March, 17, 2010.
Bayesian network inference
Bayes Rule How is this rule derived? Using Bayes rule for probabilistic inference: –P(Cause | Evidence): diagnostic probability –P(Evidence | Cause): causal.
Bayesian Networks Chapter 2 (Duda et al.) – Section 2.11
10/24  Exam on 10/26 (Lei Tang and Will Cushing to proctor)
Inference in Bayesian Nets
Bayes Nets Rong Jin. Hidden Markov Model  Inferring from observations (o i ) to hidden variables (q i )  This is a general framework for representing.
Bayesian Networks. Graphical Models Bayesian networks Conditional random fields etc.
Graphical Models Lei Tang. Review of Graphical Models Directed Graph (DAG, Bayesian Network, Belief Network) Typically used to represent causal relationship.
1 Intro to Probability Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
CPSC 322, Lecture 28Slide 1 Reasoning Under Uncertainty: More on BNets structure and construction Computer Science cpsc322, Lecture 28 (Textbook Chpt 6.3)
Constructing Belief Networks: Summary [[Decide on what sorts of queries you are interested in answering –This in turn dictates what factors to model in.
CS 188: Artificial Intelligence Spring 2007 Lecture 14: Bayes Nets III 3/1/2007 Srini Narayanan – ICSI and UC Berkeley.
10/22  Homework 3 returned; solutions posted  Homework 4 socket opened  Project 3 assigned  Mid-term on Wednesday  (Optional) Review session Tuesday.
. Approximate Inference Slides by Nir Friedman. When can we hope to approximate? Two situations: u Highly stochastic distributions “Far” evidence is discarded.
CPSC 322, Lecture 29Slide 1 Reasoning Under Uncertainty: Bnet Inference (Variable elimination) Computer Science cpsc322, Lecture 29 (Textbook Chpt 6.4)
Bayes Nets. Bayes Nets Quick Intro Topic of much current research Models dependence/independence in probability distributions Graph based - aka “graphical.
1 Bayesian Networks Chapter ; 14.4 CS 63 Adapted from slides by Tim Finin and Marie desJardins. Some material borrowed from Lise Getoor.
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,
1 Midterm Exam Mean: 72.7% Max: % Kernel Density Estimation.
Bayesian Networks Textbook: Probabilistic Reasoning, Sections 1-2, pp
Quiz 4: Mean: 7.0/8.0 (= 88%) Median: 7.5/8.0 (= 94%)
Bayesian Networks Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell,
1 Naïve Bayes Models for Probability Estimation Daniel Lowd University of Washington (Joint work with Pedro Domingos)
Cognitive Computer Vision Kingsley Sage and Hilary Buxton Prepared under ECVision Specific Action 8-3
Reasoning Under Uncertainty: Independence and Inference Jim Little Uncertainty 5 Nov 10, 2014 Textbook §6.3.1, 6.5, 6.5.1,
Baye’s Rule.
Probabilistic Reasoning ECE457 Applied Artificial Intelligence Spring 2007 Lecture #9.
Bayesian Statistics and Belief Networks. Overview Book: Ch 13,14 Refresher on Probability Bayesian classifiers Belief Networks / Bayesian Networks.
CPSC 322, Lecture 28Slide 1 More on Construction and Compactness: Compact Conditional Distributions Once we have established the topology of a Bnet, we.
Announcements Project 4: Ghostbusters Homework 7
1 CMSC 671 Fall 2001 Class #21 – Tuesday, November 13.
Reasoning under Uncertainty: Conditional Prob., Bayes and Independence Computer Science cpsc322, Lecture 25 (Textbook Chpt ) Nov, 5, 2012.
The famous “sprinkler” example (J. Pearl, Probabilistic Reasoning in Intelligent Systems, 1988)
CPSC 422, Lecture 11Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 11 Oct, 2, 2015.
Bayesian Networks Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell,
Bayesian networks and their application in circuit reliability estimation Erin Taylor.
Exact Inference in Bayes Nets. Notation U: set of nodes in a graph X i : random variable associated with node i π i : parents of node i Joint probability:
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
Pattern Recognition and Machine Learning
Today’s Topics Bayesian Networks (BNs) used a lot in medical diagnosis M-estimates Searching for Good BNs Markov Blanket what is conditionally independent.
Reasoning Under Uncertainty: Independence and Inference CPSC 322 – Uncertainty 5 Textbook §6.3.1 (and for HMMs) March 25, 2011.
Daphne Koller Overview Conditional Probability Queries Probabilistic Graphical Models Inference.
Daphne Koller Overview Maximum a posteriori (MAP) Probabilistic Graphical Models Inference.
Reasoning Under Uncertainty: Variable Elimination CPSC 322 – Uncertainty 6 Textbook §6.4.1 March 28, 2011.
QUIZ!!  T/F: You can always (theoretically) do BNs inference by enumeration. TRUE  T/F: In VE, always first marginalize, then join. FALSE  T/F: VE is.
CS 2750: Machine Learning Bayesian Networks Prof. Adriana Kovashka University of Pittsburgh March 14, 2016.
Artificial Intelligence Bayes’ Nets: Independence Instructors: David Suter and Qince Li Course Harbin Institute of Technology [Many slides.
CAP 5636 – Advanced Artificial Intelligence
Professor Marie desJardins,
Bayesian Statistics and Belief Networks
Class #19 – Tuesday, November 3
CS 188: Artificial Intelligence
Class #16 – Tuesday, October 26
Class #22/23 – Wednesday, November 12 / Monday, November 17
Presentation transcript:

Bayes network inference  A general scenario:  Query variables: X  Evidence (observed) variables and their values: E = e  Unobserved variables: Y  Inference problem: answer questions about the query variables given the evidence variables  This can be done using the posterior distribution P(X | E = e)  The posterior can be derived from the full joint P(X, E, Y)  Since Bayesian networks can afford exponential savings in representing joint distributions, can they afford similar savings for inference?

Practice example 1 Variables: Cloudy, Sprinkler, Rain, Wet Grass

Practice example 1 Given that the grass is wet, what is the probability that it has rained?

What determines whether you will pass the exam? –A: Do you attend class? –S: Do you study? –Pr: Are you prepared for the exam? –F: Is the grading fair? –Pa: Do you get a passing grade on the exam? AS Pr F Pa Practice example 2 Source: UMBC CMSC 671, Tamara Berg

Practice example 2 Source: UMBC CMSC 671, Tamara Berg ASP(Pr|A,S) TT0.9 TF0.5 FT0.7 FF0.1 AS Pr F Pa P(A=T) = 0.8 P(S=T) = 0.6 P(F=T) = 0.9 PrAFP(Pa|A,Pr,F) TTT0.9 TTF0.6 TFT0.2 TFF0.1 FTT0.4 FTF0.2 FFT0.1 FFF0.2

Practice example 2 Query: What is the probability that a student attended class, given that they passed the exam? Source: UMBC CMSC 671, Tamara Berg AS Pr F Pa

Practice example 3 Query: P(b | j, m) Can we compute this sum efficiently?

Practice example 3

Efficient exact inference Key idea: compute the results of sub-expressions in a bottom-up way and cache them for later use –Form of dynamic programming –Polynomial time and space complexity for polytrees: networks at most one undirected path between any two nodes

Representing people

Bayesian network inference In full generality, NP-hard –More precisely, #P-hard: equivalent to counting satisfying assignments We can reduce satisfiability to Bayesian network inference –Decision problem: is P(Y) > 0?

Bayesian network inference In full generality, NP-hard –More precisely, #P-hard: equivalent to counting satisfying assignments We can reduce satisfiability to Bayesian network inference –Decision problem: is P(Y) > 0? G. Cooper, 1990 C1C1 C2C2 C3C3

Bayesian network inference

Bayesian network inference: Big picture Exact inference is intractable –There exist techniques to speed up computations, but worst-case complexity is still exponential except in some classes of networks (polytrees) Approximate inference (not covered) –Sampling, variational methods, message passing / belief propagation…

Parameter learning  Inference problem: given values of evidence variables E = e, answer questions about query variables X using the posterior P(X | E = e)  Learning problem: estimate the parameters of the probabilistic model P(X | E) given a training sample {(x 1,e 1 ), …, (x n,e n )}

Parameter learning Suppose we know the network structure (but not the parameters), and have a training set of complete observations Sample CSRW 1TFTT 2FTFT 3TFFF 4TTTT 5FTFT 6TFTF ………….… ? ???? ???? ???????? Training set

Parameter learning Suppose we know the network structure (but not the parameters), and have a training set of complete observations –P(X | Parents(X)) is given by the observed frequencies of the different values of X for each combination of parent values

Parameter learning Incomplete observations Expectation maximization (EM) algorithm for dealing with missing data Sample CSRW 1?FTT 2?TFT 3?FFF 4?TTT 5?TFT 6?FTF ………….… ? ???? ???? ???????? Training set

Parameter learning What if the network structure is unknown? –Structure learning algorithms exist, but they are pretty complicated… Sample CSRW 1TFTT 2FTFT 3TFFF 4TTTT 5FTFT 6TFTF ………….… Training set C SR W ?

Summary: Bayesian networks Structure Parameters Inference Learning