Junction-tree sum-product message (source code)

= Junction-tree sum-product message
{title2=$m_{i\to j}(x_{S_{ij}})=\sum_{x_{C_i\setminus S_{ij}}}\psi_i(x_{C_i})\prod_{k\sim i,\,k\ne j}m_{k\to i}$}

Assign each factor exactly once to a containing <clique> and multiply the factors there into $\psi_i$. The displayed <sum-product belief propagation> message sums out variables of $C_i$ outside the separator $S_{ij}=C_i\cap C_j$. By the <running intersection property>, eliminating all variables in the subtree on the $i$ side creates precisely this function of the separator. An inward pass computes the <normalizing constant> at the root; an outward pass produces <marginal distributions>. For <pedigree likelihoods>, observed genotypes and <penetrance> factors simply multiply the relevant potentials.