Interpreting neural network result
4 views (last 30 days)
Show older comments
|Hi everyone I am working on matlab neural networks. I have used newff(). when I trained the network and displayed the results i come accross a problem. Actually I am finding out the result by matching actual output with the target. Inorder to do so, I roundoff the outout (because sim(network, input) gives the output values in decimals while my target values are 0s and 1s). The problem comes here due to rounding off. It is giving more than one 1 in a column which shouldnt happen as the output has to be only one 1 in a column. I am sure that this problem is due to rounding the output because i have compared it with the confusion matrix reurned by the matlab confusion().
Could anyone please tell me how to solve this problem? How can I interpret the output of the particular input other than rounding it as it is distorting the actual results. Thanks in advance.
0 Comments
Accepted Answer
Greg Heath
on 23 Jun 2012
Assume you have O (O>2) classes, O output nodes, and N targets that are columns of the O-dimensional unit matrix eye(O). Then
[ tmax targetclasses ] = max(t)
or
targetclasses = vec2ind(t)
With purelin, logsig, or softmax output activation units,
[ ymax outputclasses ] = max(y)
or
outputclasses = vec2ind(y)
Nerr = numel(outputclasses ~= targetclasses)
Note:
If you use purelin, sum(y) = 1
If you use logsig, 0 < y < 1
If you use softmax, 0 < y < 1 and sum(y) = 1 % Valid posterior probabilities
Hope this helps.
Greg
0 Comments
More Answers (0)
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!