Confusion about the confusion function

1 view (last 30 days)
Christian
Christian on 5 Feb 2013
Hello,
It seems the confusion function has been changed in R2012b with respect to the one in R2010b (or somewhere along the way). When trying a made up example in both versions I get different outputs.
a = [1 0 0 0 0;0 1 0 0 0; 0 0 1 1 1];
b = [1 0 0 0 1;0 1 0 1 0; 0 0 1 0 0];
[c,cm,ind,per] = confusion(a,b);
Can anyone explain why I get (for the per matrix) the following for R2010b:
0,00 1,00 1,00
0,00 1,00 1,00
0,66 0,00 0,33
for R2012b:
0,00 0,50 0,50 1,00
0,00 0,50 0,50 1,00
0,50 0,00 1,00 0.50
I'm ok with the extra column, but should not the first three columns be the same?
Thanks!

Answers (1)

the cyclist
the cyclist on 5 Feb 2013
I don't have the NN Toolbox, so I cannot help you directly. However, I would think that for a simple example like this, it would be fairly straightforward to breakpoint into the code in debug mode, and just step through and see how the calculations differ. That may give you some insight.
Does the documentation suggest any differences?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!