What steps will reproduce the problem?
1. See attached file mrfToMrf2Issue.m
What is the expected output? What do you see instead?
The function testMisconceptionMRFtoMRF2() should generate the same output as
the testMisconceptionMRF(). Instead, the edge potentials in the mrf2 model
appear to be getting set up incorrectly.
What version / revision of the product are you using? On what operating
system?
pmtk3-3jan11.zip - uploaded january 2012.
Matlab r2011a, Win 32 bit.
Windows 7 64bit.
Please provide any additional information below.
The attached updated file factorGraphToMrf2.m contains a proposed fix for the
issue, which appears to be at line 34:
edgesWithPots = cell2mat(cellfuncell(@(f)f.domain, epots));
whereby a row vector is returned, which is inconsistent with edgeEnds - i.e. a
column vector - when compared at line 35.
The proposed fix is after line 32:
epots = fg.factors(edgeFacNdx);
to add the following:
if isrowvec(epots)
epots = epots';
end
Original issue reported on code.google.com by ctjoreilly@gmail.com on 3 Sep 2012 at 9:22
Original issue reported on code.google.com by
ctjoreilly@gmail.com
on 3 Sep 2012 at 9:22Attachments: