Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with mrfToMrf2 logic #43

Open
GoogleCodeExporter opened this issue Dec 29, 2015 · 1 comment
Open

Possible issue with mrfToMrf2 logic #43

GoogleCodeExporter opened this issue Dec 29, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 3 Sep 2012 at 9:22

Attachments:

@GoogleCodeExporter
Copy link
Author

Moved to GitHub: https://github.com/probml/pmtk3/issues/43

Original comment by irosen on 4 Jan 2014 at 2:37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant