Unformatted text preview:

CMSC 671 Fall 2005Bayesian NetworksToday’s classBayesian Belief Networks (BNs)Example BNConditional independence and chainingChaining: ExampleTopological semanticsInference tasksApproaches to inferenceDirect inference with BNsInference by enumerationExample: EnumerationExercise: EnumerationVariable eliminationSlide 17Variable elimination: ExampleComputing factorsA more complex exampleSlide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Dealing with evidenceDealing with evidenceSlide 30Slide 31Slide 32Slide 33Slide 34Variable elimination algorithmComplexity of variable eliminationExercise: Variable eliminationConditioningApproximate inference: Direct samplingExercise: Direct samplingLikelihood weightingMarkov chain Monte Carlo algorithmExercise: MCMC samplingSummary1CMSC 671CMSC 671Fall 2005Fall 2005Class #19 / 22 – Thursday, November 3 / Tuesday, November 152Bayesian NetworksBayesian NetworksChapter 14 Some material borrowedfrom Lise Getoor3Today’s class•Bayesian networks–Network structure–Conditional probability tables–Conditional independence•Inference in Bayesian networks–Exact inference–Approximate inference4Bayesian Belief Networks (BNs)•Definition: BN = (DAG, CPD) –DAG: directed acyclic graph (BN’s structure)•Nodes: random variables (typically binary or discrete, but methods also exist to handle continuous variables)•Arcs: indicate probabilistic dependencies between nodes (lack of link signifies conditional independence)–CPD: conditional probability distribution (BN’s parameters)•Conditional probabilities at each node, usually stored as a table (conditional probability table, or CPT)–Root nodes are a special case – no parents, so just use priors in CPD:iiiixxP of nodesparent all ofset theis where)|()()|( so ,iiiixPxP 5Example BNab cd e P(C|A) = 0.2 P(C|A) = 0.005P(B|A) = 0.3 P(B|A) = 0.001P(A) = 0.001P(D|B,C) = 0.1 P(D|B,C) = 0.01P(D|B,C) = 0.01 P(D|B,C) = 0.00001P(E|C) = 0.4 P(E|C) = 0.002Note that we only specify P(A) etc., not P(¬A), since they have to add to one6•Conditional independence assumption– where q is any set of variables (nodes) other than and its successors– blocks influence of other nodes on and its successors (q influences onlythrough variables in )–With this assumption, the complete joint probability distribution of all variables in the network can be represented by (recovered from) local CPDs by chaining these CPDs:ix )|(),...,(11 iininxPxxP)|(),|(iiiixPqxPix i ix i qix i Conditional independence and chaining7Chaining: ExampleComputing the joint probability for all variables is easy:P(a, b, c, d, e) = P(e | a, b, c, d) P(a, b, c, d) by the product rule= P(e | c) P(a, b, c, d) by cond. indep. assumption= P(e | c) P(d | a, b, c) P(a, b, c) = P(e | c) P(d | b, c) P(c | a, b) P(a, b)= P(e | c) P(d | b, c) P(c | a) P(b | a) P(a)ab cd e8Topological semantics•A node is conditionally independent of its non-descendants given its parents•A node is conditionally independent of all other nodes in the network given its parents, children, and children’s parents (also known as its Markov blanket)•The method called d-separation can be applied to decide whether a set of nodes X is independent of another set Y, given a third set Z10Inference tasks•Simple queries: Computer posterior marginal P(Xi | E=e)–E.g., P(NoGas | Gauge=empty, Lights=on, Starts=false)•Conjunctive queries: –P(Xi, Xj | E=e) = P(Xi | e=e) P(Xj | Xi, E=e)•Optimal decisions: Decision networks include utility information; probabilistic inference is required to find P(outcome | action, evidence)•Value of information: Which evidence should we seek next?•Sensitivity analysis: Which probability values are most critical?•Explanation: Why do I need a new starter motor?11Approaches to inference•Exact inference –Enumeration–Belief propagation in polytrees–Variable elimination–Clustering / join tree algorithms•Approximate inference–Stochastic simulation / sampling methods–Markov chain Monte Carlo methods–Genetic algorithms–Neural networks–Simulated annealing–Mean field theory12Direct inference with BNs•Instead of computing the joint, suppose we just want the probability for one variable•Exact methods of computation:–Enumeration–Variable elimination–Join trees: get the probabilities associated with every query variable13Inference by enumeration•Add all of the terms (atomic event probabilities) from the full joint distribution•If E are the evidence (observed) variables and Y are the other (unobserved) variables, then:P(X|e) = α P(X, E) = α ∑ P(X, E, Y)•Each P(X, E, Y) term can be computed using the chain rule•Computationally expensive!14Example: Enumeration•P(xi) = Σ πi P(xi | πi) P(πi)•Suppose we want P(D=true), and only the value of E is given as true•P (d|e) =  ΣABCP(a, b, c, d, e) =  ΣABCP(a) P(b|a) P(c|a) P(d|b,c) P(e|c)•With simple iteration to compute this expression, there’s going to be a lot of repetition (e.g., P(e|c) has to be recomputed every time we iterate over C=true)ab cd e15Exercise: Enumerationsmart studyprepared fairpassp(smart)=.8 p(study)=.6p(fair)=.9p(prep|…) smartsmartstudy .9 .7study.5 .1p(pass|…)smartsmartprepprepprepprepfair .9 .7 .7 .2fair.1 .1 .1 .1Query: What is the probability that a student studied, given that they pass the exam?16Variable elimination•Basically just enumeration, but with caching of local calculations•Linear for polytrees (singly connected BNs)•Potentially exponential for multiply connected BNsExact inference in Bayesian networks is NP-hard!•Join tree algorithms are an extension of variable elimination methods that compute posterior probabilities for all nodes in a BN simultaneously17Variable eliminationGeneral idea:•Write query in the form•Iteratively–Move all irrelevant terms outside of innermost sum–Perform innermost sum, getting a new term–Insert the new term into the product kx x xiiinpaxPXP3 2)|(),( e18Variable elimination: ExampleVariable elimination: ExampleRainSprinklerCloudyWetGrassc,s,r)c(P)c|s(P)c|r(P)s,r|w(P)w(P s,r c)c(P)c|s(P)c|r(P)s,r|w(Ps,r1)s,r(f)s,r|w(P)s,r(f119Computing factorsR S C P(R|C) P(S|C) P(C) P(R|C)


View Full Document

UMBC CMSC 671 - Bayesian Networks

Download Bayesian Networks
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Bayesian Networks and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Bayesian Networks 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?