马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
小弟最近在根据一些数据进行bp进行反演计算,看了论坛上很多帖子,试着编了一下,但有些问题,还请大家能够帮忙指出,谢谢!
p=[-28.4254E+06 -25.3896E+06 -28.446E+06 -28.7319E+06 -25.8725E+06 -28.7325E+06 -24.9372E+06 -22.4592E+06 -24.9341E+06 -24.6E+06 -21.9706E+06 -24.6224E+06;
-22.5262E+06 -22.6957E+06 -28.1186E+06 -23.1457E+06 -23.1355E+06 -28.9325E+06 -20.089E+06 -20.0776E+06 -25.1145E+06 -19.493E+06 -19.6415E+06 -24.3287E+06;
-17.16E+06 -20.02E+06 -28.5998E+06 -17.49E+06 -20.405E+06 -29.1502E+06 -15.1801E+06 -17.71E+06 -25.3003E+06 -14.8499E+06 -17.325E+06 -24.7495E+06;
-11.3656E+06 -17.2509E+06 -28.2435E+06 -11.736E+06 -17.5895E+06 -29.3515E+06 -10.1864E+06 -15.262E+06 -25.481E+06 -9.83483E+06 -14.9301E+06 -24.4366E+06;
-31.501E+06 -14.0916E+06 -28.6454E+06 -31.4935E+06 -14.3487E+06 -28.6311E+06 -27.3343E+06 -12.4618E+06 -24.8432E+06 -27.2609E+06 -12.1937E+06 -24.7921E+06;
-25.4592E+06 -11.3152E+06 -28.2878E+06 -25.9488E+06 -11.5328E+06 -28.8322E+06 -22.5217E+06 -10.0096E+06 -25.0243E+06 -22.0319E+06 -9.79204E+06 -24.4795E+06;
-24.5156E+06 -14.6267E+06 -41.7367E+06 -27.0604E+06 -15.3674E+06 -51.6488E+06 -24.2417E+06 -13.9971E+06 -47.4519E+06 -22.128E+06 -13.2598E+06 -39.4839E+06;
-14.2097E+06 -5.7304E+06 -28.3995E+06 -14.625E+06 -5.84246E+06 -29.2516E+06 -12.6939E+06 -5.07047E+06 -25.3908E+06 -12.297E+06 -4.95878E+06 -24.5772E+06;
-34.6944E+06 -28.912E+06 -28.9118E+06 -35.3616E+06 -29.468E+06 -29.4682E+06 -30.6913E+06 -25.576E+06 -25.5763E+06 -30.0239E+06 -25.02E+06 -25.0195E+06]';
t=[12 27.1 18 27.4 1.0 0.9;
14 27.3 26 27.0 0.8 0.8;
16 27.5 16 27.5 0.6 0.7;
18 27.7 26 27.1 0.4 0.6;
20 27.0 14 27.6 1.1 0.5;
22 27.2 22 27.2 0.9 0.4;
24 27.4 12 27.7 0.7 0.3;
26 27.6 20 27.3 0.5 0.2;
28 27.8 28 27.8 1.2 1.0]';
pp=[-22.9224E+06 -15.6423E+06 -28.6714E+06 -22.9224E+06 -15.6423E+06 -28.6714E+06 -20.0982E+06 -13.8356E+06 -25.1178E+06 -19.8369E+06 -13.536E+06 -24.8135E+06;]';
tt=[20 27.3 15 27.6 0.8 0.55]';
%归一化
for i=1:12
P(i,:)=(p(i,:)-min(p(i,:)))/(max(p(i,:))-min(p(i,:)));
end
for i=1:6
T(i,:)=(t(i,:)-min(t(i,:)))/(max(t(i,:))-min(t(i,:)));
end
net=newff(minmax(P),[19,6],{'tansig','purelin'},'trainlm');
net.trainParam.epochs=10000;
net.trainParam.goal=0.001;
net.trainParam.show=1000;
net.trainParam.lr=0.05;
net.trainParam.show = NaN; %不显示训练过程中那个描述误差的对话框
net=train(net,P,T);
z=sim(net,pp);
请问,z得出的结果是不是就是我要最后模拟出的结果?应该和tt作比较?看看模拟的效果如何?
z要不要进行反归一化后再和tt作比较?如果是的话是不是要有下面的形式:
for i=1:6
z(i)=(max(z)-min(z))*z(i)+min(z)
end
谢谢大家了,实在是不清楚,请大家帮帮忙啊。 |