how to use sumproductlab for belief propagation algorithm on a factor graph?

Did anybody used sumproductlab(<http://www.mathworks.com/matlabcentral/fileexchange/26607-sumproductlab-for-factor-graphs>) for belief propagation algorithm ? I'm trying to implement a factor graph like this : factor graph that I want to implement
Where value of some of the x nodes are unknown and some of them are known. I want to find the values of unknown ones using belief propagation. So I created custom factor nodes for f and g but I don't know which kind of node should I use for x nodes. I tried to use evident nodes but they only have one connection. Thank you very much for any help.

Answers (3)

Hi, have you solved the problem? I encounter similar problems.

2 Comments

Hello,
Yes, what I did was to make each x node into two nodes in the graph, one evident node and one equ_node the evident node is only connected with this equ_node, and if we know the value of x the evident node gives that value with probability 1 so all messages going out of equ_node to other nodes will be that specific value, and we do not know the value the evident node just gives the same probability to all the available values.
Hi, thank you for your response. I have another question:
Assume two nodes, m(evident node) and n(cp2_node), and the transition probability from m to n is the matrix A, in the opposite direction, i.e., from n to m, the transition probability is A'. That is the approach in the toolbox. If variables are continuous, their messages is represented by means and variance. In the example of Kalman filter, xout = A*xin, means the transition probability is A from xin to xout. From xout to xin, the probabilty is A' or the inverse of A?
Could you please share the code for belief propagation algorithm? My email is hukeyongouc@163.com,Thank you!

Sign in to comment.

Hi, thank you for your response. I have another question:
Assume two nodes, m(evident node) and n(cp2_node), and the transition probability from m to n is the matrix A, in the opposite direction, i.e., from n to m, the transition probability is A'. That is the approach in the toolbox. If variables are continuous, their messages is represented by means and variance. In the example of Kalman filter, xout = A*xin, means the transition probability is A from xin to xout. From xout to xin, the probabilty is A' or the inverse of A? Thank you!
Could you please share the code for belief propagation algorithm? My email is hukeyongouc@163.com, thank you!

1 Comment

Hi,
I'm so sorry I missed this you can find my code here:
though I don't know how useful this would be for your case as this is a code for a paper which is referenced in the Github page and there are a lot of other experiments involved.

Sign in to comment.

Asked:

on 30 Dec 2015

Commented:

on 16 Jun 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!