MATLAB: How do i calculate the accuracy of ANN

neural networktrainlm

how do i calculate the accuracy of ANN?
i have 10 structures of neural network. i want to find the best structure that can predict as close as possible to the actual value.i use trainlm. so, my question is,how can i choose the best structures other than mean absolute percentage error (MAPE)?

Best Answer

So this is regression, not classification. Use fitnet and vary the number of hidden nodes. For each value of hidden nodes, design Ntrials nets that differ by the set of random initial weights.
For examples, search the NEWSGROUP and ANSWERS using
greg fitnet Hub Ntrials
Use the training record tr to separate the trn/val/tst indices and performances.
Choose a performance index
MSE % scale dependent Useless unless compared with something
NMSE = MSE/mean(var(target',1)) % Normalized MSE; Typically 0 <= NMSE <= 1
R2 = 1-NMSE % fraction of target variance that is modeled by the net (Search Rsquare in Wikipedia)
Separately tabulate the trn/val/tst results. Choose the net that has the best validation performance. If there are several with performances that are not significantly different, choose one with the smallest number of hidden nodes.
Use the corresponding test performance to predict performance on unseen data if the net is deployed.
Searching the NEWSGROUP and ANSWERS with
greg ntrials
will provide examples.
Thank you for formally accepting my answer.
Greg