how to calculate the output error for feedforwardnet?

i have design my feedforwardnet according to the examples. but how do i calculate the misclassified output? this is where my program stop so far,
output=sim(net,inp);
i'm using -1 and 1 for my target
hope for some help since neural network is still something new to me. thank you

 Accepted Answer

For classification of c classes, the target columns should be columns of the c-dimensional unit matrix.
class = vec2ind(target);
N = length(class);
....
assignedclass = vec2ind(output);
Nerr = sum(assignedclass ~= class);
PCTerr = 100*Nerr/N
Hope this helps.
Thank you for formally accepting my answer.
Greg

More Answers (0)

Categories

Find more on Deep Learning Toolbox 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!