documentation/example for MATLAB usage?

42 views
Skip to first unread message

Swagatika Panda

unread,
Dec 11, 2015, 12:21:06 AM12/11/15
to libDAI
Hi,

I had an old code that used libdai for creating a factor graph and running belief propagation. Now that I am using libdai-0.3.2, I am not able to run the same code now.

I get the error:

Undefined variable "libdai" or class
"libdai.FactorGraph".

Error in fnCrfSegmentationv8 (line 69)
fg = libdai.FactorGraph;

It looks to me that the syntax has changed with subsequent versions.

This is what I do in my code:

fg = libdai.FactorGraph;  %line 69 fnCrfSegmentationv8.m
...
...
for nodeInd = 1 : nNodes
        fg.push(nodeInd, unaryVal(nodeInd, :)');
end
...
...
for edgeInd = 1 : nEdges
    ...
    fg.push([node1 node2], pairwiseVal);
end  
....
....
R = fg.infer('BP');

Is it possible to read somewhere such that I can know how to define my factorgraph and use it properly?

Thanks & Regards,
Swagatika
Reply all
Reply to author
Forward
0 new messages