pmtk3
pmtk3 copied to clipboard
mkSoftEvidence Computes Wrong Value for Conditional Discrete Product CPDs
From [email protected] on March 01, 2011 03:32:26
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: http://code.google.com/p/pmtk3/issues/detail?id=19
From [email protected] on March 01, 2011 00:33:58
Whoops, I just noticed I didn't put in the line number --- it's line 89 in mkSoftEvidence.m.