Neural nets, how to access wrongly classified instances?

2 views (last 30 days)
Common scenario --> Use the same data set to train a feedforward 3-layer neural network with backprop for classification purposes - keep all things equal (apart from initial randomised weights) only altering number of neurons in the single hidden layer. The trial-and-error search for optimal number of neurons in the hidden layer.
Hypothetical Network A with 6 neurons in hidden layer achieves 95.6% correctness on the test data Hypothetical Network B with 17 neurons in hidden layer achieves 97.3% correct.
I would like to know which specific instances Network A misclassified and which were misclassified by Network B.
I am a newcomer to Matlab, but expect it is possible to access this data.
My question is how might I go about finding out which instances were wrongly classified?
Thanks, Amanda

Accepted Answer

Greg Heath
Greg Heath on 10 May 2013
Although your net probably has three layers of nodes, it is a 2-layer network because it only has 2 layers of weights....I know.
You didn't specify how you designed your c-class classifier.
If you used the standard method of using columns of eye(c) in the target matrix:
trueclass = vec2ind(target)
target = ind2vec(trueclass)
.....
output = net(input);
assignedclass = vec2ind(output);
errors = (assignedclass ~= truclass)
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!