cephalopod-ay / pmtk3

Automatically exported from code.google.com/p/pmtk3
MIT License
0 stars 0 forks source link

mkSoftEvidence Computes Wrong Value for Conditional Discrete Product CPDs #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a condDiscreteProdCPD by any means with d > 1.
2. Run mkSoftEvidence on it and some observations.
3. Compare output with the brute-force for-loop implementation.

What is the expected output? What do you see instead?
The computed values for logB will be different. In particular, L(:,:,i) will be 
equal to zero for i not equal to d (the dimension of the observations).

What version / revision of the product are you using? On what operating
system?
The tarball from '23nov10'

Please provide any additional information below.
The exact error is clear: at line mkSoftEvidence.m, you'll see:
> L(:,:,d) = logT(:, Xobs(j, :), j);
Note that this is a for loop 'for j = 1:d', so the L(:,:,d) should instead be 
'L(:,:,j)'. This change fixes the issue.

Original issue reported on code.google.com by cbc...@gmail.com on 1 Mar 2011 at 8:32

GoogleCodeExporter commented 8 years ago
Whoops, I just noticed I didn't put in the line number --- it's line 89 in 
mkSoftEvidence.m.

Original comment by cbc...@gmail.com on 1 Mar 2011 at 8:33

GoogleCodeExporter commented 8 years ago
Moved to GitHub: https://github.com/probml/pmtk3/issues/19

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