Reputation: 35
I was wondering whether it is possible to convert a Bayesian network into several different forms of factor graphs but still hold the same conditional probability from the original Bayesian Network. So that we can still do inference through message passing on the factor graph.
From Figure below, my intuition is that we can transform (or recalculate / redistribute) the conditional probability tablesfrom the bayesian network into all factor nodes on the converted factor graphs. But I'm not sure how to do the calculations.
So can anyone help me with this problem, possibly with examples of conditional probability tables to the factor nodes on those graphs?
Thanks for help and advice...
Upvotes: 0
Views: 912
Reputation: 541
A factor graph describes the factorization of a function in a product of smaller functions (functions with smaller number of variables). A bayesian network describes a factorization of a joint probability distribution in a product of conditional (or marginal) probability distributions. Each probability distribution can be viewed as a function. It follows that there is a (unique) factor graph which describes exactly the same decomposition of the joint distribution as the Bayesian network. Each factor node representing exactly one of the conditional probability distribution in the BN.
For instance, the Bayesian network A->B
encodes the decomposition P(A,B)=P(A).P(B|A)
. So one can build a factor graph that represents f(A,B)=P(A,B)
using 2 factors fA(A)=P(A)
and fA,B(A,B)=P(B|A)
.
In https://pyagrum.readthedocs.io/en/1.3.0/notebooks/23-Models_MarkovNetwork.html, you can see (in cell 14) the factor graph that corresponds to the bayesian network (in cell 13). In the cells below, you can see some tests of the calculations in the 2 representations.
Upvotes: 1