The Abstract Contextual Variable Elimination AlgorithmContextual Variable EliminationEvidenceExtracting the Answer

Extracting the Answer

Suppose we had a single query variable X. After setting the evidence variables, and eliminating the remaining variables, we end up with confactors of the form:
<{X=vi} ,pi>
and of the form
<{} ,ti[X]>

If e is the evidence the probability of X=vi&e is proportional to the product contributions of the confactors with context X=vi and the selection for the X=vi value for the table. Thus

P(X=vi &e) ~PROD<X=vi ,pi> piPROD<{} ,ti[X]> ti[vi].

Then we have:

P(X=vi|e) = (P(X=vi &e))/(SUMvjP(X=vj &e)).
Notice that constants of proportionality of the evidence or by removing constants (confactors with no variables) cancel in the division.

If we had multiple query variables (i.e., we wanted the marginal of the posterior), then we still multiply the remaining confactors and renormalise.


David Poole and Nevin Lianwen Zhang,Exploiting Contextual Independence In Probabilistic Inference, Journal of Artificial Intelligence Research, 18, 2003, 263-313.

The Abstract Contextual Variable Elimination AlgorithmContextual Variable EliminationEvidenceExtracting the Answer