Dear all,
I am working on the problem: y(k)=0.3*y(k-1)+0.6*y(k-2)+u(k)^3+0.3*u(k)^2-0.4*u(k) using narx. the code is listed below.
net = newnarx(u,yn,0,1:2,[15 10],{'tansig','tansig','purelin'},'trainscg');
net.trainParam.lr = 0.05; net.trainParam.lr_inc = 1.05;
net.trainParam.lr_dec = 0.7; net.trainParam.hide = 50;
net.trainParam.mc = 0.9; net.trainParam.epochs = s;
net.trainParam.goal = 1e-8; net.trainParam.time = 5*3600; [trainP,valP,testV,trainInd,valInd,testInd] = divideblock(u,0.6,0.2,0.2);
[trainT,valT,testT] = divideind(yn,trainInd,valInd,testInd);
net.divideFcn='divideblock';
net = init(net);
My training stops after 6 validation checks. Why? The trained net gives different outputs each time. Is there any mistake in the initialization?
Please help.
Best Answer