load data.txt;
clc
P=data(1:12,1:2)
T=data(1:12,3)
a=data(13:20,1:2)
s=data(13:20,3)
[pn,minp,maxp,tn,mint,maxt]=premnmx(P',T')
[an,mina,maxa,sn,mins,maxs]=premnmx(a',s')
net=newff(minmax(pn),[5 1],{'tansig','tansig'},'traingdm')
net.trainParam.epochs=300;
net.trainParam.lr=0.3;
net.trainParam.mc=0.6;
net=train (net,pn,tn);
y=sim(net,an)
t=postmnmx(y',mins,maxs)
[t s]
plot(t,'r')
hold
% Current plot held
plot(s)
title('Comparison between actual targets and predictions')
d=[t-s].^2;
mse=mean(d)
[m,b,r]=postreg(t',s')
clc
P=data(1:12,1:2)
T=data(1:12,3)
a=data(13:20,1:2)
s=data(13:20,3)
[pn,minp,maxp,tn,mint,maxt]=premnmx(P',T')
[an,mina,maxa,sn,mins,maxs]=premnmx(a',s')
net=newff(minmax(pn),[5 1],{'tansig','tansig'},'traingdm')
net.trainParam.epochs=300;
net.trainParam.lr=0.3;
net.trainParam.mc=0.6;
net=train (net,pn,tn);
y=sim(net,an)
t=postmnmx(y',mins,maxs)
[t s]
plot(t,'r')
hold
% Current plot held
plot(s)
title('Comparison between actual targets and predictions')
d=[t-s].^2;
mse=mean(d)
[m,b,r]=postreg(t',s')
No comments:
Post a Comment