Neural network performance evaluation????
Show older comments
for evaluating NN performance for a given number of trail or retrain which approach is right and why?????
for trail=1:100
net=newff(....);
[net,tr,Y,E,Pf,Af] = train(...);
......;
end
OR
net=newff(....);
for trail=1:100
[net,tr,Y,E,Pf,Af] = train(...);
........;
end
Note: i am getting decent result for both approach; but the later giving me best result.
Accepted Answer
More Answers (1)
Greg Heath
on 27 Dec 2012
0 votes
The first example is the correct one because it containss 100 random weight initializations. Therefore each net is a valid independent result.
The 2nd example just keeps training the same net more and more.
What, exactly, do you mean by decent results?
Is this regression or classification?
Are you using validation stopping?
How many acceptable solutions out of 100?
If regression, what are the means and standard deviations of the training, validation and testing NORMALIZED (with average target variance) mean-square-error?
I usually shoot for (but don't always get) NMSEtrn <= 0.01
For an I-H-O net
Ntrneq = prod(size(ttrn)) % Ntrn*O = No. of training equations
Nw = (I+1)*H +(H+1)*O % No. of unknown weights
NMSEtrn = sse(trn-ytrn)/(Ntrneq-Nw)/mean(var(ttrn',0))
NMSEi = mse(yi-ti)/mean(var(ti',1)) for i = val and test
I have posted many example in NEWSGROUP and ANSWERS. Try searching on
heath newff Ntrials
Hope this helps.
Thank you for formally accepting my answer.
Greg
8 Comments
Greg Heath
on 28 Dec 2012
if i understand you correctly, yes.
In approach 1 you are training 100 nets and if parameters are chosen reasonably with RW data, most of the nets will be useful. For c mutually exclusive classes use targets with columns from the unit c-dimensional matrix eye(c). Store Nepochs, 4 NMSEs, and 4 Pcterrs in a results matrix with size [ 100 9 ] (or two with size [100 5 ] (.
Search the matrix for failed designs and delete those rows before calculating summary stats.
In approach 2 you are designing 1 net in 100 stages. If you look at the result tabulation, Nepochs will be mostly 1 and most of the results will be equal.
Daud
on 29 Dec 2012
Daud
on 31 Dec 2012
Greg Heath
on 31 Dec 2012
NO! The second approach is in general, useless!
The idea is to train a network that will GENERALIZE well; i.e., to have good performance on nontraining data. If you have enough unknown weights compared to the number of training equations, you can get ridiculously low error rates if you train long enough.
The problem is that the network will probably not generalize well. That is, will not perform well on nontraining data.
That is why the validation set is used to represent unseen nontraining data and ends training whenever the validation error increases max_fail epochs (default = 6) in a row.
You cannot ignore that fact and just keep training.
The true measure of a net is the test set error. The validation set error is a prediction of what the test set error will be. Therefore, when it reaches a minimum in training, you should stop.
Have you taken a good look at the trn/val/tst training performance plots?
The training mse tends to monotonically decrease when the val and/or ttst mses are increasing.
This phenomenon is called overtraining an overfit (too many weights) net.
Search overfitting in the comp.ai.neural-nets FAQ and elsewhere (e.g., my posts).
Again: Net performance is measured via performance on nondesign test sets:
data = design + test
design = train + validation.
I tend to use 10 trials (not trails!)for each candidate value of hidden nodes and choose successful nets with the smallest number of hidden nodes (& weights)
I have posted many, many designs. Key search words are heath Nw and Ntrials
Hope this helps.
Greg
Daud
on 1 Jan 2013
Daud
on 1 Jan 2013
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!