Bayesian Networks CPSC 386 Artificial Intelligence Ellen Walker Hiram College.

Slides:



Advertisements
Similar presentations
Bayesian networks Chapter 14 Section 1 – 2. Outline Syntax Semantics Exact computation.
Advertisements

Probabilistic Reasoning Bayesian Belief Networks Constructing Bayesian Networks Representing Conditional Distributions Summary.
BAYESIAN NETWORKS. Bayesian Network Motivation  We want a representation and reasoning system that is based on conditional independence  Compact yet.
Probability: Review The state of the world is described using random variables Probabilities are defined over events –Sets of world states characterized.
More probability CS151 David Kauchak Fall 2010 Some material borrowed from: Sara Owsley Sood and others.
Uncertainty Everyday reasoning and decision making is based on uncertain evidence and inferences. Classical logic only allows conclusions to be strictly.
Identifying Conditional Independencies in Bayes Nets Lecture 4.
Uncertain Knowledge Representation CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Belief Networks Done by: Amna Omar Abdullah Fatima Mahmood Al-Hajjat Najwa Ahmad Al-Zubi.
1 22c:145 Artificial Intelligence Bayesian Networks Reading: Ch 14. Russell & Norvig.
Bayesian Networks Chapter 14 Section 1, 2, 4. Bayesian networks A simple, graphical notation for conditional independence assertions and hence for compact.
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.
Review: Bayesian learning and inference
Bayesian Networks. Motivation The conditional independence assumption made by naïve Bayes classifiers may seem to rigid, especially for classification.
Probability Notation Review Prior (unconditional) probability is before evidence is obtained, after is posterior or conditional probability P(A) – Prior.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 12 Jim Martin.
Bayesian networks Chapter 14 Section 1 – 2.
Bayesian Belief Networks
Visualizing Events Contingency Tables Tree Diagrams Ace Not Ace Total Red Black Total
CSE (c) S. Tanimoto, 2008 Bayes Nets 1 Probabilistic Reasoning With Bayes’ Rule Outline: Motivation Generalizing Modus Ponens Bayes’ Rule Applying.
1 A Tutorial on Bayesian Networks Modified by Paul Anderson from slides by Weng-Keen Wong School of Electrical Engineering and Computer Science Oregon.
Bayesian networks More commonly called graphical models A way to depict conditional independence relationships between random variables A compact specification.
Uncertainty Chapter 13.
Quiz 4: Mean: 7.0/8.0 (= 88%) Median: 7.5/8.0 (= 94%)
Methods in Computational Linguistics II Queens College Lecture 2: Counting Things.
Artificial Intelligence CS 165A Tuesday, November 27, 2007  Probabilistic Reasoning (Ch 14)
Bayesian Belief Network Compiled By: Raj Gaurang Tiwari Assistant Professor SRMGPC, Lucknow.
Bayesian networks Chapter 14 Section 1 – 2. Bayesian networks A simple, graphical notation for conditional independence assertions and hence for compact.
Bayesian Belief Networks. What does it mean for two variables to be independent? Consider a multidimensional distribution p(x). If for two features we.
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes March 13, 2012.
LECTURE IV Random Variables and Probability Distributions I.
Artificial Intelligence CS 165A Thursday, November 29, 2007  Probabilistic Reasoning / Bayesian networks (Ch 14)
Probabilistic Belief States and Bayesian Networks (Where we exploit the sparseness of direct interactions among components of a world) R&N: Chap. 14, Sect.
Bayesian networks. Motivation We saw that the full joint probability can be used to answer any question about the domain, but can become intractable as.
1 Monte Carlo Artificial Intelligence: Bayesian Networks.
Introduction to Bayesian Networks
An Introduction to Artificial Intelligence Chapter 13 & : Uncertainty & Bayesian Networks Ramin Halavati
1 Reasoning Under Uncertainty Artificial Intelligence Chapter 9.
Uncertainty Uncertain Knowledge Probability Review Bayes’ Theorem Summary.
Generalizing Variable Elimination in Bayesian Networks 서울 시립대학원 전자 전기 컴퓨터 공학과 G 박민규.
Uncertainty. Assumptions Inherent in Deductive Logic-based Systems All the assertions we wish to make and use are universally true. Observations of the.
METU Informatics Institute Min720 Pattern Classification with Bio-Medical Applications Lecture notes 9 Bayesian Belief Networks.
1 Chapter 12 Probabilistic Reasoning and Bayesian Belief Networks.
CS 416 Artificial Intelligence Lecture 14 Uncertainty Chapters 13 and 14 Lecture 14 Uncertainty Chapters 13 and 14.
Marginalization & Conditioning Marginalization (summing out): for any sets of variables Y and Z: Conditioning(variant of marginalization):
Uncertainty ECE457 Applied Artificial Intelligence Spring 2007 Lecture #8.
Review: Bayesian inference  A general scenario:  Query variables: X  Evidence (observed) variables and their values: E = e  Unobserved variables: Y.
PROBABILITY THEORY RULES OF PROBABILITY - review Rule 1: 0  P(A)  1 for any event A –Any probability is a number between 0 and 1 Rule 2: P(S) = 1 –All.
1 Bayesian Networks: A Tutorial. 2 Introduction Suppose you are trying to determine if a patient has tuberculosis. You observe the following symptoms:
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
1 Probability FOL fails for a domain due to: –Laziness: too much to list the complete set of rules, too hard to use the enormous rules that result –Theoretical.
Conditional Probability, Bayes’ Theorem, and Belief Networks CISC 2315 Discrete Structures Spring2010 Professor William G. Tanner, Jr.
Belief Networks Kostas Kontogiannis E&CE 457. Belief Networks A belief network is a graph in which the following holds: –A set of random variables makes.
CSE (c) S. Tanimoto, 2007 Bayes Nets 1 Bayes Networks Outline: Why Bayes Nets? Review of Bayes’ Rule Combining independent items of evidence General.
Weng-Keen Wong, Oregon State University © Bayesian Networks: A Tutorial Weng-Keen Wong School of Electrical Engineering and Computer Science Oregon.
Chapter 12. Probability Reasoning Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #8
Bayesian networks Chapter 14 Section 1 – 2.
Presented By S.Yamuna AP/CSE
Quick Review Probability Theory
Quick Review Probability Theory
Bayesian Networks: A Tutorial
Conditional Probability, Bayes’ Theorem, and Belief Networks
Bayesian Networks Probability In AI.
CSCI 121 Special Topics: Bayesian Networks Lecture #2: Bayes Nets
Bayesian networks Chapter 14 Section 1 – 2.
Probabilistic Reasoning
ECE457 Applied Artificial Intelligence Spring 2008 Lecture #8
Presentation transcript:

Bayesian Networks CPSC 386 Artificial Intelligence Ellen Walker Hiram College

Bayes’ Rule P(A^B) = P(A|B) * P(B) = P(B|A) * P(A) So P(A|B) = P(B|A) * P(A) / P(B) This allows us to compute diagnostic probabilities from causal probabilities and prior probabilities!

Joint Probability Distribution Consider all possibilities of a set of propositions E.g. Picking 2 cards from a deck P(card1 is red and card2 is red) P(card1 is red and card2 is black) P(card1 is black and card2 is red) P(card1 is black and card2 is black) Sum of all combinations should be 1 Sum of all “card1 is red” combinations is P(card1 is red)

Joint P.D. table Second card is red Second card is black First card is red26*25/52*51 (0.245) 26*26/52*51 (0.255) First card is black 26*26/52*51 (0.255) 26*25/52*51 (0.245)

Operations on Joint P.D. Marginalization (summing out) –Add up elements in a row or column that contain all possibilities for a given item to remove that item from the distribution P(1st card is red) = = 0.5 Conditioning –Get a distribution over one variable by summing out all other variables Normalization –Take the values in the distribution and find a proper multiplier (alpha) so that they add up to 1.

A bigger joint PD FluNo flu FeverNo feverFeverNo fever ache No ache

Based on that PD… Summing out… –P(flu) = 0.25 –P(fever) = 0.45 –P(flu ^ fever) = 0.2 –P(~flu ^ fever) = 0.25 –P(flu | fever) = P(flu ^ fever) / P(fever) =.0.2 / 0.45 = (4/9) Normalizing –P(flu | fever) =  = 0.2/ (0.45) = 4/9

Evaluating Full Joint PD’s Advantage –All combinations are available –Any joint or unconditional probability can be computed Disadvantage –Combinatorial Explosion! For N variables, need 2 N individual probabilities –Difficult to get probabilities for all combinations

Independence Absolute independence: –P(A|B) = P(A) or P(A,B) = P(A)*P(B) –No need for joint table

Conditional independence P(A|B,C)= P(A|C) or P(A,B|C) = P(A|C)*P(B|C) If we know the truth of C, then A and B become independent –(e.g. ache and fever are independent given flu) We can say C “separates” A and B

Naïve Bayes model Assume that all possible effects (symptoms) are separated by the cause Then: –P(cause, effect1, effect2, effect3…) = P(effect1|cause) * P(effect2|cause) * … Can work surprisingly well in many cases Necessary conditional probabilities can be learned

Bayesian Network Data structure that represents –Dependencies (and conditional independencies) among variables –Necessary information to compute a full joint probability distribution

Structure of Bayesian Network Nodes represent random variables –(e.g. flu, fever, ache) Directed links (arrows) connect pairs of nodes, from parent to child Each node has joint P.D. P(child | parents) –More parents, bigger P.D. Graph has no directed cycles –No node is its own (great… grand) parent!

Example Bayesian Network Thermometer >100 F feverachespots Damp weather flumeasles

Probabilities in the network Probability of set of variable assignments is the product of joint probabilities computed from parents –P(x1,x2, …) = P(x1 |parents(X1))* P(x2 |parents(X2)) … Example –P(~therm ^ damp ^ ache ^ ~fever ^flu) = P(~therm) * P(damp) * P(ache | damp) *P(~fever | therm) * P(flu | ache ^ fever)

Constructing a Bayesian Network Start with root causes Add direct consequences next (connected) and so on… –E.g. damp weather -> ache, not damp weather -> flu Each node should be directly connected to (influenced by) only a few If we choose a different order, we’ll get tables that are too big!