[NEURAL NETWORK] How can I make MSE be the same in different trying times ?
Show older comments
The Mean Square Error (MSE) turns out to be different each time I train the network.
_net = feedforwardnet(10,'trainlm');
net.divideParam.trainRatio=1;
net.divideParam.valRatio=0;
net.divideParam.testRatio=0;
net.trainParam.epochs=10;
[net,tr]=train(net2,x,t);
MSE=sumsqr(net2(x)-t)_
I guess it come from net2.initFcn caused this problem. How do I change it to make MSE becomes the same ?
Accepted Answer
More Answers (1)
Greg Heath
on 2 Dec 2014
0 votes
Remove the underscores at the beginning and end.
Use net.divideFcn = 'dividetrain' to automatically get the (1/0/0) data division
I hope you don't use 10 epochs for serious work
net2 in never defined
MSE depends on net, not net2
sumsq yields SSE, not MSE
For repeatability you have to set the initial state of the random number generator before data divisions and weight initializations.
MSE is scale dependent. Better to normalize by the average target variance
Hope this helps.
Thank you for formerly accepting my answer
Greg
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!