Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

SymbolicFactorGraph

A SymbolicFactorGraph is a factor graph consisting purely of SymbolicFactor objects. It represents the structure or topology of a probabilistic graphical model (like a Markov Random Field) without the numerical details.

It’s primarily used to illustrate symbolic elimination, which determines the structure of the resulting Bayes net or Bayes tree and finds an efficient variable elimination ordering (e.g., using COLAMD or METIS).

Open In Colab

Creating and Manipulating Symbolic Factor Graphs

Symbolic Factor Graph:
 
size: 5
factor 0:   x0
factor 1:   x0 x1
factor 2:   x1 x2
factor 3:   x0 l1
factor 4:   x1 l2
Loading...

Symbolic Elimination

We can perform symbolic elimination to get the structure of the resulting Bayes net or Bayes tree.


Resulting Symbolic Bayes Net:
 
size: 5
conditional 0:  P( l1 | x0)
conditional 1:  P( x0 | x1)
conditional 2:  P( l2 | x1)
conditional 3:  P( x1 | x2)
conditional 4:  P( x2)
Loading...

Resulting Symbolic Bayes Tree:
: cliques: 4, variables: 5

Resulting Symbolic Bayes Tree:
- P( x1 x2)

Resulting Symbolic Bayes Tree:
| - P( x0 | x1)

Resulting Symbolic Bayes Tree:
| | - P( l1 | x0)

Resulting Symbolic Bayes Tree:
| - P( l2 | x1)
Loading...