|
CODE:
load osforce2.m;
a=osforce2';
load osgap2.m;
b=osgap2';
[nb,minb,maxb,na,mina,maxa]=premnmx(b,a);
net=init(net);
net=newff([-1 1],[10,6,1],{'tansig','logsig','purelin'},'traingdm');
net.trainParam.show = 50;
net.trainParam.lr = 0.05;
net.trainParam.epochs = 10000;
net.trainParam.goal = 1e-5;
net=train(net,nb,na);
nc= sim(net,nb);
c=postmnmx(nc,mina,maxa);
load osgap2.m;
test=osgap2';
[ntest,mintest,maxtest]=premnmx(test);
nnetout= sim(net,ntest);
netout=postmnmx(nnetout,mina,maxa);
load osforce2.m;
real=osforce2';
me=mean(real-netout)
st=std(netout-real)
save d:\wzy.txt c -ASCII;
load spssyce.m;
spss=spssyce';
sts=std(real-spss)
GMT+8, 2024-12-25 17:18 , Processed in 0.056404 second(s), 16 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.