School of EECS Washington State University. Artificial Intelligence

Similar documents
Bayesian networks. Chapter Chapter

Bayesian networks. Chapter 14, Sections 1 4

Probabilistic Reasoning Systems

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

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

PROBABILISTIC REASONING SYSTEMS

Quantifying uncertainty & Bayesian networks

Bayesian Networks. Motivation

last two digits of your SID

Directed Graphical Models

Reasoning Under Uncertainty

Artificial Intelligence Bayesian Networks

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

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

Probabilistic Reasoning. Kee-Eung Kim KAIST Computer Science

Reasoning Under Uncertainty

Artificial Intelligence Methods. Inference in Bayesian networks

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

Inference in Bayesian Networks

Learning Bayesian Networks (part 1) Goals for the lecture

Inference in Bayesian networks

Informatics 2D Reasoning and Agents Semester 2,

Probabilistic Reasoning. (Mostly using Bayesian Networks)

Bayesian Networks. Philipp Koehn. 6 April 2017

CS 730/730W/830: Intro AI

CS 380: ARTIFICIAL INTELLIGENCE UNCERTAINTY. Santiago Ontañón

Bayesian Networks BY: MOHAMAD ALSABBAGH

Bayesian Networks. Philipp Koehn. 29 October 2015

Foundations of Artificial Intelligence

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

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

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

14 PROBABILISTIC REASONING

Course Overview. Summary. Outline

Bayesian Belief Network

PROBABILISTIC REASONING Outline

Graphical Models - Part I

Bayes Networks 6.872/HST.950

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

Lecture 10: Bayesian Networks and Inference

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

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

CS 343: Artificial Intelligence

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

CS 188: Artificial Intelligence. Bayes Nets

Implementing Machine Reasoning using Bayesian Network in Big Data Analytics

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

Probabilistic Models

Uncertainty and Bayesian Networks

Review: Bayesian learning and inference

CSE 473: Artificial Intelligence Autumn 2011

Artificial Intelligence

Belief Networks for Probabilistic Inference

CS 343: Artificial Intelligence

CS 5522: Artificial Intelligence II

Probabilistic Representation and Reasoning

Bayesian networks (1) Lirong Xia

Artificial Intelligence Bayes Nets: Independence

CS 188: Artificial Intelligence Fall 2009

CS 188: Artificial Intelligence Spring Announcements

Quantifying Uncertainty

Bayesian networks. Chapter AIMA2e Slides, Stuart Russell and Peter Norvig, Completed by Kazim Fouladi, Fall 2008 Chapter 14.

Bayes Nets: Independence

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

CS 5522: Artificial Intelligence II

Inference in Bayesian networks

Bayesian networks. Chapter Chapter

Lecture 8: Bayesian Networks

Learning With Bayesian Networks. Markus Kalisch ETH Zürich

Bayesian networks. Chapter Chapter Outline. Syntax Semantics Parameterized distributions. Chapter

Introduction to Artificial Intelligence Belief networks

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

COMP5211 Lecture Note on Reasoning under Uncertainty

CS Belief networks. Chapter

Bayesian Networks. Vibhav Gogate The University of Texas at Dallas

Probabilistic Models. Models describe how (a portion of) the world works

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

Announcements. Inference. Mid-term. Inference by Enumeration. Reminder: Alarm Network. Introduction to Artificial Intelligence. V22.

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

Axioms of Probability? Notation. Bayesian Networks. Bayesian Networks. Today we ll introduce Bayesian Networks.

Uncertainty and Belief Networks. Introduction to Artificial Intelligence CS 151 Lecture 1 continued Ok, Lecture 2!

CSEP 573: Artificial Intelligence

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

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

Introduction to Artificial Intelligence. Unit # 11

Bayes Nets III: Inference

This lecture. Reading. Conditional Independence Bayesian (Belief) Networks: Syntax and semantics. Chapter CS151, Spring 2004

Introduction to Probabilistic Reasoning. Image credit: NASA. Assignment

Bayesian Networks. Axioms of Probability Theory. Conditional Probability. Inference by Enumeration. Inference by Enumeration CSE 473

Bayesian networks: Modeling

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

Another look at Bayesian. inference

Stochastic inference in Bayesian networks, Markov chain Monte Carlo methods

Graphical Models and Kernel Methods

Artificial Intelligence Uncertainty

Machine Learning for Data Science (CS4786) Lecture 24

CMPSCI 240: Reasoning about Uncertainty

Probabilistic representation and reasoning

Bayesian Networks. Characteristics of Learning BN Models. Bayesian Learning. An Example

Bayesian Networks. Material used

Transcription:

School of EECS Washington State University Artificial Intelligence 1

} Full joint probability distribution Can answer any query But typically too large } Conditional independence Can reduce the number of probabilities needed P(X Y,Z) = P(X Z), if X independent of Y given Z } Bayesian network Concise representation of above Artificial Intelligence 2

} Example Artificial Intelligence 3

} Bayesian network is a directed, acyclic graph } Each node corresponds to a random variable } A directed link from node X to node Y implies that X influences Y X is the parent of Y } Each node X has a conditional probability distribution P(X Parents(X)) Quantifies the influence on X from its parent nodes Conditional probability table (CPT) Artificial Intelligence 4

} Represents full joint distribution } Represents conditional independence E.g., JohnCalls is independent of Burglary and Earthquake given Alarm Artificial Intelligence 5 )) ( ( ),..., ( )) ( ( )... ( 1 1 1 1 1 Õ Õ = = = = = = Ù Ù = n i i i n n i i i i n n X parents x P x x P X parents x X P x X x X P

} P(b, e,a,j,m) = (0.001)(0.998)(0.94)(0.90)(0.70) = 0.000591 Artificial Intelligence 6

} Determine set of random variables {X 1,,X n } } Order them so that causes precede effects } For i = 1 to n do Choose minimal set of parents for X i such that P(X i X i-1,,x 1 ) = P(X i Parents(X i )) For each parent X k insert link from X k to X i Write down the CPT, P(X i Parents(X i )) } E.g., Burglary, Earthquake, Alarm, JohnCalls, MaryCalls Artificial Intelligence 7

} Bad orderings lead to more complex networks with more CPT entries a) MaryCalls, JohnCalls, Alarm, Burglary, Earthquake b) MaryCalls, JohnCalls, Earthquake, Burglary, Alarm Artificial Intelligence 8

} Example: Tooth World Variables: Cavity, Toothache, Catch Cavity P(Cavity) 0.2 Cavity P(Toothache) Cavity P(Catch) t 0.6 Toothache Catch t 0.9 f 0.1 f 0.2 toothache toothache catch catch catch catch cavity.108.012.072.008 cavity.016.064.144.576 Artificial Intelligence 9

} Node X is conditionally independent of its nondescendants (Z ij s) given its parents (U i s) } Markov blanket of node X is X s parents (U i s), children (Y i s) and children s parents (Z ij s) } Node X is conditionally independent of all other nodes in the network given its Markov blanket Artificial Intelligence 10

} Want P(X e) } X is the query variable (can be more than one) } e is an observed event, i.e., values for the evidence variables E = {E 1,,E m } } Any other variables Y are hidden variables } Example P(Burglary JohnCalls=true, MaryCalls=true) =? X = Burglary e = {JohnCalls=true, MaryCalls=true} Y = {Earthquake, Alarm} Artificial Intelligence 11

} Enumerate over all possible values for Y P(X e) = α P(X,e) = α S y P(X,e,y) } Example P(Burglary JohnCalls=true, MaryCalls=true) P(B j,m) = α P(B,j,m) = α S e S a P(B,j,m,e,a) Let b represent (B=true) P(b j,m) = α S e S a P(b)P(e)P(a b,e)p(j a)p(m a) P(b j,m) = α P(b) S e P(e)S a P(a b,e)p(j a)p(m a) Artificial Intelligence 12

} P(b j,m) = α P(b) S e P(e)S a P(a b,e)p(j a)p(m a) } P(B j,m) = α á0.0005922, 0.0014919ñ = á0.284,0.716ñ Artificial Intelligence 13

function ENUMERATION-ASK (X, e, bn) returns a distribution over X inputs: X, the query variable e, observed values of variables E bn, a Bayes net with variables {X} È E È Y Q(X) a distribution over X, initially empty for each value x i of X do Q(x i ) ENUMERATE-ALL(bn.VARS, e xi ) where e xi is e extended with X = x i return NORMALIZE(Q(X)) // Y = hidden variables bn.vars has variables in causeàeffect order function ENUMERATE-ALL (vars, e) returns a real number if EMPTY? (vars) then return 1.0 Y FIRST (vars) if Y has value y in e then return P(y parents(y)) ENUMERATE-ALL(REST(vars), e) else return S y P(y parents(y)) ENUMERATE-ALL(REST(vars), e y ) where e y is e extended with Y = y Artificial Intelligence 14

} ENUMERATION-ASK evaluates trees using depthfirst recursion } Space complexity O(n) } Time complexity O(v n ), where each of n variables has v possible values Artificial Intelligence 15

Note redundant computation Artificial Intelligence 16

} Avoid redundant computation Dynamic programming Store intermediate computations and reuse } Eliminate irrelevant variables Variables that are not an ancestor of a query or evidence variable Artificial Intelligence 17

} General case (any type of network) Worst case space and time complexity is exponential } Polytree is a network with at most one undirected path between any two nodes Space and time complexity is linear in size of network Polytree Not a polytree Artificial Intelligence 18

} Improbability Drive The Hitchhiker s Guide to the Galaxy (2005) Artificial Intelligence 19

} Exact inference can be too expensive } Approximate inference Estimate probabilities from sample, rather than computing exactly } Monte Carlo methods Choose values for hidden variables, compute query variables, repeat and average } Direct sampling } Markov chain sampling Artificial Intelligence 20

} Choose value for variables according to their CPT Consider variables in topological order } E.g., P(B) = á0.001,0.999ñ, B=false P(E) = á0.002,0.998ñ, E=false P(A B=false,E=false) = á0.001,0.999ñ, A=false P(J A=false) = á0.05,0.95ñ, J=false P(M A=false) = á0.01,0.99ñ, M=false Sample is [false,false,false,false,false] samples where X = xi P( X = xi )» samples Artificial Intelligence 21

} New sample generated by random changes to preceding sample Not generated from scratch } Markov Chain Monte Carlo (MCMC) } Gibbs sampling Fix evidence variables to observed values Randomly set non-evidence variables Repeat for desired number of samples Randomly choose a non-evidence variable X Randomly choose new value for X based on CPT Generate sample Artificial Intelligence 22

} Gibbs sampling example } E.g., P(B J=true,M=true) Evidence: J=true, M=true Random initial state: B=true, E=false, A=true P(B) = á0.001,0.999ñ, B=false Sample 1: [false,false,true,true,true] P(E) = á0.002,0.998ñ, E=false Sample 2: [false,false,true,true,true] P(A B=false,E=false) = á0.001,0.999ñ, A=false Sample 3: [false,false,false,true,true] Repeat for more B s, E s and A s (any order) Artificial Intelligence 23

} Sampling techniques converge to correct probabilities given enough samples Artificial Intelligence 24

} Commercial Bayes Server (www.bayesserver.com) BayesiaLab (www.bayesia.com) Netica APIs (www.norsys.com) HUGIN (www.hugin.com) } Free BayesPy (www.bayespy.org) JavaBayes (www.cs.cmu.edu/~javabayes) SMILE (www.bayesfusion.com) } Sample networks www.bnlearn.com/bnrepository Artificial Intelligence 25

} Bayesian networks Captures full joint probability distribution and conditional independence } Exact inference Intractable in worst case } Approximate inference Sampling Converges to exact inference Artificial Intelligence 26