why this matters
play

Why This Matters Bayesian networks have been one of the most - PDF document

Why This Matters Bayesian networks have been one of the most important contributions to the field of CS 331: Artificial Intelligence AI in the last 10-20 years Bayesian Networks Provide a way to represent knowledge in an uncertain


  1. Why This Matters • Bayesian networks have been one of the most important contributions to the field of CS 331: Artificial Intelligence AI in the last 10-20 years Bayesian Networks • Provide a way to represent knowledge in an uncertain domain and a way to reason about this knowledge • Many applications: medicine, factories, help desks, spam filtering, etc. Thanks to Andrew Moore for some course material 1 2 A Bayesian Network Outline A Bayesian network is made B P(B) E P(E) up of two parts: 1. Brief Introduction to Bayesian networks false 0.999 false 0.998 true 0.001 true 0.002 1. A directed acyclic graph 2. Semantics of Bayesian networks 2. A set of parameters Burglary Earthquake • Bayesian networks as a full joint probability distribution • Bayesian networks as encoding conditional B E A P(A|B,E) Alarm false false false 0.999 independence relationships false false true 0.001 false true false 0.71 false true true 0.29 true false false 0.06 true false true 0.94 true true false 0.05 3 true true true 0.95 A Directed Acyclic Graph A Directed Acyclic Graph Burglary Earthquake Burglary Earthquake Alarm Alarm • Intuitively, an arrow from node X to node Y means X has a direct 1. A directed acyclic graph: influence on Y (often X has a causal effect on Y) • The nodes are random variables (which can be discrete or • Easy for a domain expert to determine these relationships continuous) • The absence/presence of arrows will be made more precise later • Arrows connect pairs of nodes (X is a parent of Y if there is an on arrow from node X to node Y). 5 6 1

  2. A Set of Parameters A Set of Parameters Conditional Probability B P(B) E P(E) Burglary Earthquake Stores the probability distribution for Distribution for Alarm false 0.999 false 0.998 Alarm given the values of Burglary and Earthquake true 0.001 true 0.002 B E A P(A|B,E) false false false 0.999 Alarm For a given combination of values of the B E A P(A|B,E) false false true 0.001 parents (B and E in this example), the false false false 0.999 false true false 0.71 entries for P(A=true|B,E) and Each node X i has a conditional probability false false true 0.001 false true true 0.29 P(A=false|B,E) must add up to 1 e.g. distribution P(X i | Parents(X i )) that quantifies the false true false 0.71 true false false 0.06 P(A=true|B=false,E=false) + effect of the parents on the node false true true 0.29 true false true 0.94 P(A=false|B=false,E=false)=1 true false false 0.06 The parameters are the probabilities in these true true false 0.05 conditional probability distributions true false true 0.94 true true true 0.95 true true false 0.05 Because we have discrete random variables, we true true true 0.95 have conditional probability tables (CPTs) If you have a Boolean variable with k Boolean parents, how big is the conditional probability table? 7 How many entries are independently specifiable? Bayesian Network Example Bayesian Network Example Coin P(Coin) Coin Card P(Card | Coin) Card Candy P(Candy | Card) tails 0.5 tails black 0.6 black 1 0.5 Weather Cavity heads 0.5 tails red 0.4 black 2 0.2 heads black 0.3 black 3 0.3 Toothache Catch heads red 0.7 red 1 0.1 red 2 0.3 red 3 0.6 Things of note: • Weather is independent of the other variables What does the DAG for this Bayes net look like? • Toothache and Catch are conditionally independent given Cavity (this is represented by the fact that there is no link between Toothache and Catch and by the fact that they have Cavity as a parent) 9 10 Bayes Nets Formalized A Bayes net (also called a belief network) is an augmented directed acyclic graph, represented by the pair V , E where: – V is a set of vertices. Semantics of Bayesian Networks – E is a set of directed edges joining vertices. No loops of any length are allowed. Each vertex in V contains the following information: – The name of a random variable – A probability distribution table indicating how the probability of this variable’s values depends on all possible combinations of parental values. 11 12 2

  3. A Representation of the Full Joint Semantics of Bayesian Networks Distribution • We will use the following abbrevations: Two ways to view Bayes nets: – P( x 1 , …, x n ) for P( X 1 = x 1  …  X n = x n ) 1. A representation of a joint probability – parents(X i ) for the values of the parents of X i distribution • From the Bayes net, we can calculate: 2. An encoding of a collection of conditional independence statements n   P ( x ,..., x ) P ( x | parents ( X )) 1 n i i  i 1 13 14 The Full Joint Distribution The Full Joint Distribution n n   P ( x ,..., x )  ( | ,..., ) ( | ( )) P x x x P x parents x 1 n  i i 1 1 i i  ( | ,..., ) ( ,..., )   P x x x P x x ( Chain Rule) i 1 i 1   1 1 1 1 n n n  ( | ,..., ) ( | ,..., ) ( ,..., ) P x x x P x x x P x x ( Chain Rule) To be able to do this, we need two things:     n n 1 1 n 1 n 2 1 n 2 1  ( | ,..., ) ( | ,..., )... ( | ) ( ) 1. Parents ( X i )  { X i-1 , …, X 1 } P x x x P x x x P x x P x    n n 1 1 n 1 n 2 1 2 1 1 ( Chain Rule) n This is easy – we just label the nodes according to the   ( | ,..., ) P x x x  i i 1 1 partial order in the graph We’ll look at this step  i 1 2. We need X i to be conditionally independent of its n more closely   ( | ( )) P x parents x predecessors given its parents i i  i 1 This can be done when constructing the network. Choose parents that directly influence X i . 15 16 Conditional Independence Example We can look at the actual graph structure and determine Burglary Earthquake conditional independence relationships. 1. A node ( X ) is conditionally independent of its non- descendants ( Z 1j , Z nj ), given its parents ( U 1 , U m ). Alarm JohnCalls MaryCalls P ( JohnCalls , MaryCalls , Alarm , Burglary , Earthquake ) = P ( JohnCalls | Alarm ) P ( MaryCalls | Alarm ) P ( Alarm | Burglary , Earthquake ) P ( Burglary ) P ( Earthquake ) 17 18 3

  4. Conditional Independence Conditional Independence 2. Equivalently, a node ( X ) is conditionally independent of all • Previously, we conditioned on either the parent other nodes in the network, given its parents (U 1 , U m ), children (Y 1 , Y n ), and children’s parents (Z 1j ,Z nj ) – that is, given its values or the values of the nodes in the Markov Markov blanket blanket • There is a much more general topological criterion called d-separation • d-separation determines whether a set of nodes X is independent of another set Y given a third set E • You should use d-separation for determining conditional independence 19 20 D-separation D-separation • We will use the notation I(X, Y | E) to mean • Let evidence nodes E  V (where V are the that X and Y are conditionally independent vertices or nodes in the graph), and X and Y given E be distinct nodes in V – E . • Theorem [Verma and Pearl 1988]: • We say X and Y are d-separated by E in the If a set of evidence variables E d-separates X and Bayesian network if every undirected path Y in the Bayesian Network’s graph, then between X and Y is blocked by E . I(X, Y | E) • What does it mean for a path to be blocked? • d-separation can be determined in linear There are 3 cases… time using a DFS-like algorithm 21 22 Case 1 Case 2 There exists a node N on the path such that There exists a node N on the path such that • It is in the evidence set E (shaded grey) • It is in the evidence set E • The arcs putting N in the path are “tail -to- • The arcs putting N in the path are “tail -to- tail”. head”. X N Y X N Y Or The path between X and Y is blocked by N X N Y The path between X and Y is blocked by N 23 24 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend