Felsenstein pruning algorithm Created 2026-10-06 Updated 2026-10-20
The Felsenstein pruning algorithm computes a site likelihood function by sum-product belief propagation from leaves to root. For a finite-state Markov kernel , the subtree likelihood function obeys , with observed-state indicators at leaves. Summing against the root probability distribution gives the site likelihood function. An outward pass gives edge posterior probabilities and expected transition counts for the expectation-maximization algorithm.
Junction tree 2026-10-14
A junction tree connects the maximal cliques of a chordal graph into a tree satisfying the running intersection property. Its edges carry separators equal to the intersections of the endpoint cliques. Assigning original factors to containing cliques permits exact sum-product belief propagation without summing independently over the entire collection of variables.
Assign each factor exactly once to a containing clique and multiply the factors there into . The displayed sum-product belief propagation message sums out variables of outside the separator . By the running intersection property, eliminating all variables in the subtree on the 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.
The posterior mean of the number infected is
Run sum-product belief propagation on the tree to compute every exact one-vertex posterior marginal. Summing their probabilities of state one gives the requested mean. Messages have fixed size and every directed edge is processed once, so the exact computation costs