How to compute the goodness of fit or the mean square error after training the neural network ?

1 view (last 30 days)
Hi all, I am using nntool for patter recognition problem.After training the network, the outputs that are created are errors,info,network model.How to compute the goodness of fit or mean square error of the network after training it ? Thank you

Accepted Answer

Greg Heath
Greg Heath on 7 Jan 2014
The best figure of merit for classification and pattern recognition is a weighted average of between-class misclassification rates. Sophisticated models use weights that depend on the product of class dependent a priori probabilities and between-class misclassification costs (See your favorite book on pattern recognition, e.g., Duda et al).
c-class network targets are chosen to be columns of the c-dimensional unit matrix. The target matrix of dimension [ c N ] is obtained from the row vector of true class indices in the interval [1,c] and vice-versa:
target = ind2vec(trueclassindices);
trueclassindices = vec2ind(target);
Corresponding real-valued network outputs are interpreted as class posterior probabilities, conditional on the input.
Indices for assigned classifications are determined from the maximum posterior estimate via
assignedclassindices = vec2ind(output);
The corresponding N-dimensional 0/1 error row vector is obtained from
err = (assignedclassindices~=trueclassindices);
from which the number of errors and corresponding error rates for each class can be obtained.
Search the NEWSGROUP and ANSWERS for examples. For example
greg patternnet vec2ind
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 Comment
Suresh
Suresh on 7 Jan 2014
Thanks Greg, The error matrix will give [c N] matrix.But for calculating overall goodness of fit of the network after training and after testing with real world data which procedure can be used? Thank you

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!