330 likes | 433 Views
Inference in Bayesian Networks. Pr: Evidence: Pr(e) Posterior marginals: Pr(x|e) for every X MPE: Most probable instantiation: Instantiation y such that Pr(y|e) is maximal (Y = E) MAP: Maximum a posteriori hypothesis: Intantiation y such that Pr(y|e) is maximal (Y is subset of E).
E N D
Inference in Bayesian Networks A. Darwiche
Pr: Evidence: Pr(e) Posterior marginals: Pr(x|e) for every X MPE: Most probable instantiation: Instantiation y such that Pr(y|e) is maximal (Y = E) MAP: Maximum a posteriori hypothesis: Intantiation y such that Pr(y|e) is maximal (Y is subset of E) Query Types A. Darwiche
Pr: Posterior Marginals Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio A. Darwiche
Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio ok on yes no ok off yes no Diagnosis Scenario .001 .090 A. Darwiche
MPE: Most Probable Explanation Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio A. Darwiche
MPE: Most Probable Explanation Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio A. Darwiche
MAP: Maximum a Posteriori Hypothesis Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio A. Darwiche
MAP: Maximum a Posteriori Hypothesis Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio A. Darwiche
MAP: Maximum a Posteriori Hypothesis Battery Age Alternator Fan Belt Charge Delivered Battery Fuel Pump Fuel Line Starter Distributor Gas Battery Power Spark Plugs Gas Gauge Engine Start Lights Engine Turn Over Radio A. Darwiche
Probability of Evidence A. Darwiche
+ * * A B ØB A B + + A ØA Factoring true false .9 true .3 true .1 true false true .8 false .7 * * * * * * false false .2 .3 λa λb .7 .1 .9 .8 .2 λ~a λ~b false A. Darwiche
Notation • A binary variable X: • is variable with two values (true, false) • x is short notation for X=true • ~x is short notation for X=false • If X is a variable with parents Y and Z, then: represents the probability Pr(X=x | Y=y, Z=y) • If X is a binary variable with parents Y and Z (also binary), then: represents the probability Pr(X=true | Y=false, Z=true) A. Darwiche
An instantiation is a set of variables with their values: X=true,Y=false, Z=true is an instantiation A=a, B=b, C=c is an instantiation x, ~y, z is short notation for the instantiationX=true, Y=false, Z=true a,b,c is short notation for the instantiation A=a, B=b, C=c Two instantiations are inconsistent iff they assign different values to the same variable: x,~y,z and x,y,z are inconsistent x,~y,z and a,b,c are consistent Notation A. Darwiche
A B Pr true true .03 true false .27 false true .56 false false false .14 false Joint Probability Distribution Pr(a) = .03 + .27 = .3 A. Darwiche
A B Pr true true .03 true false .27 false true .56 false false false .14 false Joint Probability Distribution Pr(~b) = .27 + .14 = .41 A. Darwiche
λa λb …are called evidence indicators Evidence Indicators A B Pr λaλb .03 .03 true true .27 λaλ~b .27 true false λ~aλb .56 .56 false true false λ~aλ~b .14 .14 false false false F = .03λaλb + .27λaλ~b + .56λ~aλb + .14λ~a λ~b F is called the polynomial of the given probability distribution A. Darwiche
To compute the probability of instantiation e: Evaluate polynomial F while replacing each indicator -by 1 if the instantiation is consistent with the indicator;-by 0 if the instantiation is inconsistent with the indicator Examples: Indicator λa is consistent with instantiation a,~b,c Indicator λb is inconsistent with instantiation a,~b,c Indicator λd is consistent with instantiation a,~b,c Indicator λ~d is consistent with instantiation a,~b,c Computing Probabilities A. Darwiche
Computing Probabilities F = .03λaλb + .27λaλ~b + .56λ~aλb + .14λ~a λ~b To compute the probability of instantiation a, ~b: F(a,~b) = .03*1*0+ .27*1*1+ .56*0*0+ .14*0*1 = .27 To compute the probability of instantiation ~a: F(~a) = .03*0*1+ .27*0*1+ .56*1*1+ .14*1*1 = .70 A. Darwiche
A B Pr .03=.3*.1 true true A B .27=.3*.9 true false ØB A B A ØA true false .9 56=.7*.8 false true true .3 true .1 true false true .8 false .7 false false .2 false .14=.7*.2 false false false A. Darwiche
A B ØB A B A ØA θ b|a true true θa θ~b|a true true false θ~a θ b|~a false true false θ ~b|~a false false A B Pr θa θ b|a true true θa θ~b|a true false θ~a θ b|~a false true false θ~a θ ~b|~a false false false A. Darwiche
A B ØB A B A ØA θ b|a true true θa θ~b|a true true false θ~a θ b|~a false true false θ ~b|~a false false A B Pr λaλbθa θ b|a true true λaλ~bθa θ~b|a true false λ~aλbθ~a θ b|~a false true false λ~aλ~bθ~a θ ~b|~a false false false A. Darwiche
A B ØB A B A ØA θ b|a true true θa θ~b|a true true false θ~a θ b|~a false true false θ ~b|~a false false A B Pr λaλbθa θ b|a true true λaλ~bθa θ~b|a true false λ~aλbθ~a θ b|~a false true false λ~aλ~bθ~a θ ~b|~a false false λa λb θa θb|a+ λa λ~b θa θ~b|a+ λ~aλb θ~a θb|~a+ λ~a λ~b θ~a θ~b|~a A. Darwiche
B A ØB A B A ØA true true θ b|a true θa true false θ~b|a false θ~a false true θ b|~a false false θ ~b|~a false The Polynomial of a Bayesian Network λa λb θa θb|a+ λa λ~b θa θ~b|a+ λ~aλb θ~a θb|~a+ λ~a λ~b θ~a θ~b|~a A. Darwiche
C B D A The Polynomial of a Bayesian Network F = λa λb λc λd θa θb|a θc|a θd|bc + λa λb λc λ~d θa θb|a θc|a θ~d|bc + …. A. Darwiche
+ Factoring * * + + * * * * * * θa λa λb θab θa~b θ~ab λ~b θ~a~b λ~a θ~a Arithmetic Circuit λa λb θa θb|a+ λa λ~b θa θ~b|a+ λ~aλb θ~a θb|~a+ λ~a λ~b θ~a θ~b|~a A. Darwiche
Arithmetic Circuit Pr(a) .3 + * * .3 0 + + 1 1 * * * * * .3 .1 .9 .8 .2 0 * θa λa λb 1 1 1 0 .3 .1 .9 .8 .2 .7 θab θa~b θ~ab λ~b θ~a~b λ~a θ~a A. Darwiche
+ * * A B ØB A B + + A ØA Factoring true false .9 true .3 true .1 true false true .8 false .7 * * * * * * false false .2 θa λa λb θ~a θb|a θ~b|a θb|~a θ~b|~a λ~a λ~b false A. Darwiche
T S1 S2 S3 … Sn Factoring the Polynomial of a Bayesian Network A. Darwiche
Sophisticated Platform (desktop) Eval Eval Eval compiler A. Circuit A. Circuit A. Circuit Primitive Platforms (embedded) Embedding Probabilistic Reasoning Systems A. Darwiche
TreeWidth(Measures connectivity of Networks) Higher treewidth A. Darwiche
TreeWidth(Measures connectivity of Networks) Multiply-connected networks Singly-connected network (polytree) A. Darwiche
The treewidth of a polytree is m, where m is the maximum number of parents that any node If each node has at most one parent, the polytree is called a tree The treewidth of a tree is 1 Treewidth A. Darwiche
Given a Bayesian network N with: Number of nodes: n Treewith: w We can generate an arithmetic circuit for N: In O(n 2w) time In O(n 2w) space It is easy to do inference on polytrees Treewidth A. Darwiche