How to compute the goodness of fit or the mean square error after training the neural network ?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Greg Heath
2014년 1월 7일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!