Interpreting neural network result

6 vues (au cours des 30 derniers jours)
Bushra
Bushra le 23 Juin 2012
|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.

Réponse acceptée

Greg Heath
Greg Heath le 23 Juin 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

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by