How retrain yet trained closed loop NAR
4 ビュー (過去 30 日間)
古いコメントを表示
I want to retrain a yet trained closed loop NAR (to improve performance), but how?
Below my code.
% from open loop neto to closed
netc=closeloop(neto,Xoi,Aoi);
[Xc,Xci,Aci,Tc]=preparets(netc,{},{},T);
[Yc,Xcf,Acf]=netc(Xc,Xci,Aci);
Ec=gsubtract(Tc,Yc);
% some error metric
NMSEc=mse(Ec)/varto;
Ectrn=Ec(trnind);
Ecval=Ec(valind);
Ectst=Ec(tstind);
NMSEctrn=mse(Ectrn)/var(totrn,1);
NMSEcval=mse(Ecval)/var(toval,1);
NMSEctst=mse(Ectst)/var(totst,1);
R2ctrn = 1 - mse( Ectrn )/var(totrn,1);
R2cval = 1 - mse( Ecval )/var(toval,1);
R2ctst = 1 - mse( Ectst )/var(totst,1);
R2c = 1 - mse( Ec )/varto;
%%Retrain NAR
% [Xc, Xci, Aci,Tc ] = preparets(netc,{},{},T); % I think this is not necessary
% netc=configure(netc,Xc,Tc); % even this seems useless
% netc.trainFcn='trainlm'; % if I not change algorithm training stops after 3 or 4 iterations
% retrain using Xcf and Acf from netc output states?
[netcr,trcr, Ycr, Ecr, Acfr, Xcfr] = train(netc,Xc,Tc,Xcf,Acf);
NMSEcr=mse(Ecr)/varto;
R2cr = 1 - mse( Ecr )/varto;
Thanks!
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!