Contextual Factors |

**Definition.**
*
A contextual factor or confactor is a pair of the form:
*

<c,t>

A confactor represents a partial function [32] from the union of the variables. The function only has a value when the context is true, and the value of the function is obtained by looking up the value in the table.

Just as tables can be used to represent conditional probabilities,
confactors can be used to represent conditional probabilities
when there is context-specific independence.
In particular, a set of parent contexts can be represented as a set of
confactors with mutually exclusive and exhaustive bodies. Given a
parent skeleton for variable *X* we can construct a set of confactors
for *X* as follows: for each *<c,V>* in the parent skeleton for
*X*, we construct a confactor *<c,t({X} union V)>* where
*t({X=x}&V=v)= P(X=x|V=v &c)*.

**Definition.**
*
A confactor is applicable on a context if the
body of the confactor is compatible with the context.
*

**Definition.**
*
Given a confactor r=<X_{1}=v_{k}&...&X_{k}=v_{k}, t[X_{k+1},...,X_{m}]> and a context c that assigns at least
the variables X_{1}...X_{m}, if r is
applicable in c, the value of the
context c with respect to the
confactor r is the value of t[X_{k+1}=v_{k+1},...,X_{m}=v_{m}] where
v_{k+1},...,v_{m} are the values assigned to X_{k+1},...,X_{m} in c.
*

**Definition.**
*
A set R of confactors represents a conditional
probability P(X_{i}|X_{1}...X_{i-1}) if the bodies of the confactors are
mutually exclusive and exhaustive, and if P(X_{i}=v_{i}|X_{1}=v_{1}&...&X_{i-1}=v_{i-1}) is equal to the value of the context X_{1}=v_{1}&...&X_{i-1}=v_{i-1}&X_{i}=v_{i} with respect to the (unique) confactor in R
that is applicable in that context.
*

Intuitively, the confactors that represent a contextual belief network are a way to organize the parent contexts. The idea is to represent the parent contexts in tables when there is no context-specific independence, and when some variables are independent of their predecessors in some context, then that context can be made a body of the confactors.

**Example.**
*
Consider the conditional probabilities represented in Figure
*.
E is independent of its predecessors given {B} and context
a. This leads to the confactor:
*

<a,t _{1}[B,E]>

`~`

a &c

< `~`

a &c ,t_{2}[E]>

`~`

a &`~`

c &D

< `~`

a &`~`

c &d ,t_{3}[B,E]>

`~`

a &`~`

c &`~`

dThe full multiset of confactors corresponding to the trees of Figure * are given in Figure *. The fifth and sixth confactors give the conditional probability for

< `~`

a &`~`

c &`~`

d ,t_{4}[E]>

P(E|A,B,C,D)

P(B|Y,Z)

<y, >

B Z Value true true 0.77 true false 0.17 false true 0.23 false false 0.83 < `~`

y,>

B Value true 0.27 false 0.73

P(D|Y,Z)

<z, >

D Value true 0.29 false 0.71 < `~`

z,>

D Y Value true true 0.79 true false 0.59 false true 0.21 false false 0.41

The confactors corresponding to the trees of Figure *

We can now rewrite the definition of a contextual belief network in terms of confactors:

If every conditional probability is represented by a set of
confactors,
the probability of a complete context, *c* is the product of the
values of *c* with respect to the confactors that are applicable in *c*.
For each complete context and for each variable there is one
confactor containing that variable that is applicable in that
context.

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

Contextual Factors |