Recognize overfitting in retraining
Afficher commentaires plus anciens
I wrote the following code, inspired of those proposed in the neural network toolbox manual, to retrain a network
load dati_MRTA.mat% where IN_MRTA=13x49 double and TARGET_MRTA=1x49 double
Q=size(IN_MRTA,2);
Q1=floor(Q*0.9);
Q2=Q-Q1;
ind=randperm(Q);
ind1=ind(1:Q1);
ind2=ind(Q1+(1:Q2));
x1=IN_MRTA(:,ind1);
t1=TARGET_MRTA(:,ind1);
x2=IN_MRTA(:,ind2);
t2=TARGET_MRTA(:,ind2);
net=feedforwardnet(13,'trainlm');
numNN=10;
NN=cell(1,numNN);
tr=cell(1,numNN);
perfs=zeros(3,numNN);
for i=1:numNN
disp(['Training ' num2str(i) '/' num2str(numNN)])
[NN{i},tr{i}]=train(net,x1,t1);
y2=NN{i}(x2);
perfs(1,i)=sqrt(tr{i}.best_perf);
perfs(2,i)=sqrt(tr{i}.best_vperf);
perfs(3,i)=sqrt(mse(net,t2,y2));
end
best results I've obtained during the same iteration are RMSEtraining=4.8730 RMSEvalidation=7.8195 RMSEtest=10.3158, the corresponding performanec plot is the following:

it does reprents a good result or it is and indication of possible overfitting?
1 commentaire
Greg Heath
le 26 Sep 2015
Either post your data or choose an example from MATLAB's NN examples.
help nndatasets
and
doc nndatasets
Hope this helps.
Greg
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!