Slide 1 Reasoning Under Uncertainty: More on BNets structure and construction Jim Little Nov 10 2014 (Textbook 6.3)

Slides:



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

BAYESIAN NETWORKS Ivan Bratko Faculty of Computer and Information Sc. University of Ljubljana.
Probabilistic Reasoning Bayesian Belief Networks Constructing Bayesian Networks Representing Conditional Distributions Summary.
Representations for KBS: Uncertainty & Decision Support
Bayesian Network and Influence Diagram A Guide to Construction And Analysis.
Bayesian Networks CSE 473. © Daniel S. Weld 2 Last Time Basic notions Atomic events Probabilities Joint distribution Inference by enumeration Independence.
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.
Reasoning Under Uncertainty: Bayesian networks intro Jim Little Uncertainty 4 November 7, 2014 Textbook §6.3, 6.3.1, 6.5, 6.5.1,
For Monday Finish chapter 14 Homework: –Chapter 13, exercises 8, 15.
Bayesian Networks VISA Hyoungjune Yi. BN – Intro. Introduced by Pearl (1986 ) Resembles human reasoning Causal relationship Decision support system/ Expert.
CSCI 121 Special Topics: Bayesian Networks Lecture #3: Multiply-Connected Graphs and the Junction Tree Algorithm.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) March, 16, 2009.
Reasoning under Uncertainty: Conditional Prob., Bayes and Independence Computer Science cpsc322, Lecture 25 (Textbook Chpt ) March, 17, 2010.
Probabilistic Reasoning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 14 (14.1, 14.2, 14.3, 14.4) Capturing uncertain knowledge Probabilistic.
Bayesian networks Chapter 14 Section 1 – 2.
Bayesian Belief Networks
Example applications of Bayesian networks
CPSC 322, Lecture 28Slide 1 Reasoning Under Uncertainty: More on BNets structure and construction Computer Science cpsc322, Lecture 28 (Textbook Chpt 6.3)
5/25/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 16, 6/1/2005 University of Washington, Department of Electrical Engineering Spring 2005.
CPSC 322, Lecture 31Slide 1 Probability and Time: Markov Models Computer Science cpsc322, Lecture 31 (Textbook Chpt 6.5) March, 25, 2009.
CPSC 322, Lecture 32Slide 1 Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5) March, 27, 2009.
CPSC 422, Lecture 18Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 18 Feb, 25, 2015 Slide Sources Raymond J. Mooney University of.
CPSC 322, Lecture 29Slide 1 Reasoning Under Uncertainty: Bnet Inference (Variable elimination) Computer Science cpsc322, Lecture 29 (Textbook Chpt 6.4)
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,
Bayesian networks More commonly called graphical models A way to depict conditional independence relationships between random variables A compact specification.
Quiz 4: Mean: 7.0/8.0 (= 88%) Median: 7.5/8.0 (= 94%)
Advanced Artificial Intelligence
Machine Learning CUNY Graduate Center Lecture 21: Graphical Models.
Bayes’ Nets  A Bayes’ net is an efficient encoding of a probabilistic model of a domain  Questions we can ask:  Inference: given a fixed BN, what is.
Made by: Maor Levy, Temple University  Probability expresses uncertainty.  Pervasive in all of Artificial Intelligence  Machine learning 
Bayesian Belief Networks. What does it mean for two variables to be independent? Consider a multidimensional distribution p(x). If for two features we.
Reasoning Under Uncertainty: Bayesian networks intro CPSC 322 – Uncertainty 4 Textbook §6.3 – March 23, 2011.
Reasoning Under Uncertainty: Independence and Inference Jim Little Uncertainty 5 Nov 10, 2014 Textbook §6.3.1, 6.5, 6.5.1,
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 Chapter 14 Probabilistic Reasoning. 2 Outline Syntax of Bayesian networks Semantics of Bayesian networks Efficient representation of conditional distributions.
2 Syntax of Bayesian networks Semantics of Bayesian networks Efficient representation of conditional distributions Exact inference by enumeration Exact.
Baye’s Rule.
Probabilistic Reasoning ECE457 Applied Artificial Intelligence Spring 2007 Lecture #9.
Introduction to Bayesian Networks
Bayes Nets recitation Bayes Nets Represent dependencies between variables Compact representation of probability distribution Flu Allergy.
CPSC 322, Lecture 32Slide 1 Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5.2) Nov, 25, 2013.
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
Reasoning under Uncertainty: Conditional Prob., Bayes and Independence Computer Science cpsc322, Lecture 25 (Textbook Chpt ) Nov, 5, 2012.
CHAPTER 6 Naive Bayes Models for Classification. QUESTION????
Computer Science CPSC 322 Lecture 27 Conditioning Ch Slide 1.
CPSC 422, Lecture 11Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 11 Oct, 2, 2015.
Finish Probability Theory + Bayesian Networks Computer Science cpsc322, Lecture 9 (Textbook Chpt ) June, 5, CPSC 322, Lecture 9.
1 CMSC 671 Fall 2001 Class #20 – Thursday, November 8.
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.
Bayes network inference  A general scenario:  Query variables: X  Evidence (observed) variables and their values: E = e  Unobserved variables: Y 
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.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) Nov, 13, 2013.
Reasoning Under Uncertainty: Variable Elimination for Bayes Nets Jim Little Uncertainty 6 Nov Textbook §6.4,
Reasoning Under Uncertainty: Variable Elimination CPSC 322 – Uncertainty 6 Textbook §6.4.1 March 28, 2011.
CS 2750: Machine Learning Bayesian Networks Prof. Adriana Kovashka University of Pittsburgh March 14, 2016.
Lecture 21, Bayesian Networks Wrap Up Intro to Decision Theory Slide 1.
Computer Science CPSC 322 Lecture 19 Bayesian Networks: Construction 1.
Reasoning Under Uncertainty: Belief Networks
Reasoning Under Uncertainty: More on BNets structure and construction
Bayesian networks Chapter 14 Section 1 – 2.
Reasoning Under Uncertainty: More on BNets structure and construction
Reasoning Under Uncertainty: Bnet Inference
CAP 5636 – Advanced Artificial Intelligence
Reasoning Under Uncertainty: Bnet Inference
CS 188: Artificial Intelligence
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 18
Presentation transcript:

Slide 1 Reasoning Under Uncertainty: More on BNets structure and construction Jim Little Nov (Textbook 6.3)

Slide 2 Belief networks Recap By considering causal dependencies, we order variables in the joint. Apply ? and simplify Build a directed acyclic graph (DAG) in which the parents of each var X are those vars on which X directly depends. By construction, a var is independent from its non-descendants given its parents. chain rule

Slide 3 Belief Networks: open issues Compactness: For n vars, k parents, we reduce the number of probabilities from to In some domains we need to do better than that! Independencies: Does a BNet encode more independencies than the ones specified by construction? Still too many and often there are no data/experts for accurate assessment Solution: Make stronger (approximate) independence assumptions

Slide 4 Lecture Overview Implied Conditional Independence relations in a Bnet Compactness: Making stronger Independence assumptions Representation of Compact Conditional Distributions Network structure( Naïve Bayesian Classifier)

Slide 5 Bnets: Entailed (in)dependencies Indep(Report, Fire,{Alarm})? Indep(Leaving, SeeSmoke,{Fire})?

Slide 6 Or, blocking paths for probability propagation. Three ways in which a path between X to Y can be blocked, (1 and 2 given evidence E ) Conditional Independencies Z Z Z XYE Note that, in 3, X and Y become dependent as soon as I get evidence on Z or on any of its descendants 1 2 3

Slide 7 Or ….Conditional Dependencies Z Z Z XY E In 1, 2, 3 X Y are dependent

Slide 8 In/Dependencies in a Bnet : Example 1 Z Z Z XYE Is A conditionally independent of I given F?

Slide 9 In/Dependencies in a Bnet : Example 2 Z Z Z XYE 1 2 3

Slide 10 In/Dependencies in a Bnet : Example 3 Z Z Z XYE 1 2 3

Slide 11 Lecture Overview Implied Conditional Independence relations in a Bnet Compactness: Making stronger Independence assumptions Representation of Compact Conditional Distributions Network structure( Naïve Bayesian Classifier)

Slide 12 More on Construction and Compactness: Compact Conditional Distributions Once we have established the topology of a Bnet, we still need to specify the conditional probabilities How? From Data From Experts To facilitate acquisition, we aim for compact representations for which data/experts can provide accurate assessments

Slide 13 More on Construction and Compactness: Compact Conditional Distributions From JointPD to But still, CPT grows exponentially with number of parents In realistic model of internal medicine with 448 nodes and 906 links 133,931,430 values are required! And often there are no data/experts for accurate assessment

Slide 14 Effect with multiple non-interacting causes Malaria Fever Cold What do we need to specify? Flu MalariaFlu Cold P(Fever=T |..)P(Fever=F|..) TT T TT F TF T TF F FT T FT F FF T FF F What do you think data/experts could easily tell you? More difficult to get info to assess more complex conditioning….

Slide 15 Solution: Noisy-OR Distributions Models multiple non interacting causes Logic OR with a probabilistic twist. MalariaFluColdP(Fever=T |..)P(Fever=F|..) TT T TT F TF T TF F FT T FT F FF T FF F Logic OR Conditional Prob. Table.

Slide 16 Solution: Noisy-OR Distributions The Noisy-OR model allows for uncertainty in the ability of each cause to generate the effect (e.g.. one may have a cold without a fever) Two assumptions 1. All possible causes are listed 2. For each of the causes, whatever inhibits it to generate the target effect is independent from the inhibitors of the other causes MalariaFluColdP(Fever=T |..)P(Fever=F|..) TTT TTF TFT TFF FTT FTF FFT FFF

Slide 17 Noisy-OR: Derivations For each of the causes, whatever inhibits it from generating the target effect is independent from the inhibitors of the other causes C1C1 Effect CkCk Independent Probability of failure q i for each cause alone: P(Effect=F | C i = T, and no other causes) = q i P(Effect=F | C 1 = T,.. C j = T, C j+1 = F,., C k = F)= C. A. B. D. None of these

Slide 18 Noisy-OR: Derivations For each of the causes, whatever inhibits it to generate the target effect is independent from the inhibitors of the other causes Independent Probability of failure q i for each cause alone: P(Effect=F | C i = T, and no other causes) = q i P(Effect=F | C 1 = T,.. C j = T, C j+1 = F,., C k = F)= P(Effect=T | C 1 = T,.. C j = T, C j+1 = F,., C k = F) = 1- C1C1 Effect CkCk

Slide 19 Noisy-OR: Example P(Fever=F| Cold=T, Flu=F, Malaria=F) = 0.6 P(Fever=F| Cold=F, Flu=T, Malaria=F) = 0.2 P(Fever=F| Cold=F, Flu=F, Malaria=T) = 0.1 P(Effect=F | C 1 = T,.. C j = T, C j+1 = F,., C k = F)= ∏ j i=1 q i Model of internal medicine 133,931,430  8,254 With noisy ors MalariaFluColdP(Fever=T |..)P(Fever=F|..) TTT 0.1 x 0.2 x 0.6 = TTF 0.2 x 0.1 = 0.02 TFT 0.6 x 0.1=0.06 TFF FTT0.2 x 0.6 = 0.12 FTF FFT FFF1.0 Number of probabilities needed linear in k 3 here

Slide 20 Lecture Overview Implied Conditional Independence relations in a Bnet Compactness: Making stronger Independence assumptions Representation of Compact Conditional Distributions Network structure ( Naïve Bayesian Classifier)

Naïve Bayesian Classifier A very simple and successful form of Bnet that can classify entities in a set of classes C, given a set of attributes Example: Determine whether an is spam (only two classes spam=T and spam=F) Useful attributes of an ? Assumptions The value of each attribute depends on the classification (Naïve) The attributes are independent of each other given the classification P(“bank” | “account”, spam=T) = P(“bank” | spam=T) Slide 21 / =

What is the structure? Spam contains “free” contains “money” contains “ubc” contains “midterm” Assumptions The value of each attribute depends on the classification (Naïve) The attributes are independent of each other given the classification Spam contains “free” contains “money” contains “ubc” contains “midterm” contains “free” contains “money” contains “ubc” contains “midterm” Spam C. A. B. Slide 22

Naïve Bayesian Classifier for Spam Spam contains “free” words Number of parameters? contains “money” contains “ubc” contains “midterm” Assumptions The value of each attribute depends on the classification (Naïve) The attributes are independent of each other given the classification If you have a large collection of s for which you know if they are spam or not…… Easy to acquire? Slide 23

Most likely class given set of observations Is a given E spam? “free money for you now” NB Classifier for Spam: Usage Spam contains “free” contains “money” contains “ubc” contains “midterm” is a spam if……. Slide 24

For another example of naïve Bayesian Classifier See textbook ex help system to determine what help page a user is interested in based on the keywords they give in a query to a help system. Slide 25

Slide 26 Learning Goals for today’s class You can: Given a Belief Net, determine whether one variable is conditionally independent of another variable, given a set of observations. Define and use Noisy-OR distributions. Explain assumptions and benefit. Implement and use a naïve Bayesian classifier. Explain assumptions and benefit.

Slide 27 Next Class Bayesian Networks Inference: Variable Elimination