Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 801 Bytes

Elimination-Ask.md

File metadata and controls

16 lines (13 loc) · 801 Bytes

ELIMINATION-ASK

AIMA3e

function ELIMINATION-ASK(X, e, bn) returns a distribution over X
inputs: X, the query variable
     e, observed values for variables E
     bn, a Bayesian network specifying joint distribution P(X1, …, Xn)

factors ← []
for each var in ORDER(bn.VARS) do
   factors ← [MAKE-FACTOR(var, e) | factors]
   if var is a hidden variable then factors ← SUM-OUT(var, factors)
return NORMALIZE(POINTWISE-PRODUCT(factors))


Figure ?? The variable elimination algorithm for inference in Bayesian networks.