This preview shows pages 1–8. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Inference in Bayesian networks Chapter 14.4–5 Chapter 14.4–5 1 Outline ♦ Exact inference by enumeration ♦ Exact inference by variable elimination ♦ Approximate inference by stochastic simulation ♦ Approximate inference by Markov chain Monte Carlo Chapter 14.4–5 2 Inference tasks Simple queries : compute posterior marginal P ( X i  E = e ) e.g., P ( NoGas  Gauge = empty, Lights = on,Starts = false ) Conjunctive queries : P ( X i ,X j  E = e ) = P ( X i  E = e ) P ( X j  X i , E = e ) Optimal decisions : decision networks include utility information; probabilistic inference required for P ( outcome  action,evidence ) Value of information : which evidence to seek next? Sensitivity analysis : which probability values are most critical? Explanation : why do I need a new starter motor? Chapter 14.4–5 3 Inference by enumeration Slightly intelligent way to sum out variables from the joint without actually constructing its explicit representation Simple query on the burglary network: B E J A M P ( B  j, m ) = P ( B,j, m ) /P ( j, m ) = α P ( B, j,m ) = α Σ e Σ a P ( B,e,a,j, m ) Rewrite full joint entries using product of CPT entries: P ( B  j, m ) = α Σ e Σ a P ( B ) P ( e ) P ( a  B,e ) P ( j  a ) P ( m  a ) = α P ( B ) Σ e P ( e ) Σ a P ( a  B,e ) P ( j  a ) P ( m  a ) Recursive depthfirst enumeration: O ( n ) space, O ( d n ) time Chapter 14.4–5 4 Enumeration algorithm function EnumerationAsk ( X , e , bn ) returns a distribution over X inputs : X , the query variable e , observed values for variables E bn , a Bayesian network with variables { X } ∪ E ∪ Y Q ( X ) ← a distribution over X , initially empty for each value x i of X do extend e with value x i for X Q ( x i ) ← EnumerateAll ( Vars [ bn ], e ) return Normalize ( Q ( X ) ) function EnumerateAll ( 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  Pa ( Y )) × EnumerateAll ( Rest ( vars ), e ) else return ∑ y P ( y  Pa ( Y )) × EnumerateAll ( Rest ( vars ), e y ) where e y is e extended with Y = y Chapter 14.4–5 5 Evaluation tree P(ja) .90 P(ma) .70 .01 P(m a) .05 P(j a) P(ja) .90 P(ma) .70 .01 P(m a) .05 P(j a) P(b) .001 P(e) .002 P( e) .998 P(ab,e) .95 .06 P( ab, e) .05 P( ab,e) .94 P(ab, e) Enumeration is inefficient: repeated computation e.g., computes P ( j  a ) P ( m  a ) for each value of e Chapter 14.4–5 6 Inference by variable elimination Variable elimination: carry out summations righttoleft, storing intermediate results ( factors ) to avoid recomputation P ( B  j, m ) = α P ( B ) B Σ e P ( e ) E Σ a P ( a  B,e ) A P ( j  a ) J P ( m  a ) M = α P ( B ) Σ e P ( e ) Σ a P ( a  B,e ) P ( j  a ) f M ( a ) = α P ( B ) Σ e P ( e ) Σ a P ( a  B,e ) f J ( a ) f M ( a ) = α P ( B ) Σ e P ( e ) Σ a f A ( a,b,e ) f J ( a ) f M ( a ) = α P ( B ) Σ e P ( e ) f ¯ AJM ( b,e ) (sum out A ) = α P ( B ) f ¯ E ¯ AJM ( b )...
View
Full
Document
This note was uploaded on 02/07/2012 for the course CSCI 5512 taught by Professor Staff during the Spring '08 term at Minnesota.
 Spring '08
 Staff

Click to edit the document details