Recognize overfitting in retraining
이전 댓글 표시
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
Greg Heath
2015년 9월 26일
Either post your data or choose an example from MATLAB's NN examples.
help nndatasets
and
doc nndatasets
Hope this helps.
Greg
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!