MATLAB: What does OUtputs mean in neural network Tollbox ?

MATLABneural networkneural networkstoolbox

Hi,
I'm appliying a neural network for classification of my dataster so i used :
net = patternnet( hiddenLayerSize); to create the network ; [net, tr] = train(net, inputs, targets); for training ; outputs = net(inputs); to test the network;
My question is : What does the outputs matrix represent ?? , i'm triyng to find in which class the test examples have been classified without using the targets; so i need to understand the outputs !!
Can anybody help me please ?

Best Answer

For c classes, targets should be columns of the unit matrix eye(c)
[ c N ] = size(targets)
trueclassindices = vec2ind(targets) % 1<= indices <= c
targets = ind2vec(trueclassindices) % columns of eye(c)
...
assignedclassindices = vec2ind(outputs)
err = ( assignedclassindices ~= trueclassindices )
Nerr = sum(err)
PctErr = 100*Nerr/N
To find the errors of class i, find the indices of the class i members by using the trueclassindices
indi = (truclassindices == i)
Ni = length(indi)
Do not have time for a more helpful answer right now.
Meanwhile, check out some of my code, comment and answers. Search on
greg patternet
and look at the newest posts first.
End statements with semicolons after you understand what they produce
Also: There may be something useful in the NEWSGROUP.
Hope this helps.
Thank you for formally accepting my answer
Greg