Plotting MSE of Validation and Testing Data during training of ANN

3 views (last 30 days)
Hi,
Is it possible to plot the MSE of the Validation data and Testing Data during the actual training of an ANN? I think I have a problem of overtraining and want to know the best time to manually stop the training. Alternatively is there a method to load the weights etc from an old epoch obtained during training?
Many Thanks

Accepted Answer

Greg Heath
Greg Heath on 15 Sep 2012
Edited: Greg Heath on 15 Sep 2012
What version of the NN toolbox are you using? The latest versions have
fitnet for regression or curvefitting
patternnet for classification and pattern recognition
The previous versions were newfit and newpr, respectively.
All versions have a default trn/val/tst (0.7/0.15/0.15) random division option for validation stopping(val) and unbiased prediction(tst). Various other combinations of data division types and percent ratios are available via overwriting the defaults.
lookfor divide
Another way to avoid overtraining an overfit net is to make sure the number of output training equations Neq = prod(size(targets)) = O*N is significantly larger than the number of unknown weights Nw = net.numWeightElements = (I+1)*H+(H+1)*O for an I-H-O FFMLP.
Neq >> Nw ==> H << (Neq-O)/(I+O+1)
Hope this helps.
Thank you for officially accepting my answer(;>)
  1 Comment
Sam harris
Sam harris on 15 Sep 2012
Thanks for you help Greg, I'll check the number of output training equations and see how it goes.
thanks,
Sam

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!