声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2585|回复: 0

[1stopt] 1stopt拟合效果改进

[复制链接]
发表于 2010-1-14 11:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
请教dingd大哥:

            小弟利用1stopt1.5注册版,编写代码如下。可是不知道怎么改进拟合效果,拟合出来的结果变化很大。残差平方和一直在500~7000范围内变化。
             以下是小弟的代码
            (dingd大哥上次给小弟的源代码,在1stopt1.5注册版下没办法运行)

Parameters a1=[30,100],a2=[0,100],k1=[0.0000001,],k2=[0.0000001,],e1=[1,6],e2=[6,],m1=[0,2.5],m2=[0,3];
DataSet;
x1,x2,x3,y=
2.17443817 20000000 4000000 38.78281088
2.17443817 10000000 4000000 44.59858879
2.17443817 6666666.667 4000000 49.3818121
2.17443817 5000000 4000000 53.69283966
2.17443817 4000000 4000000 60.05552783
2.17443817 20000000 7000000 17.00890896
2.17443817 10000000 7000000 29.80451694
2.17443817 6666666.667 7000000 33.3594336
2.17443817 5000000 7000000 39.9399893
2.098561413 20000000 4000000 21.50582624
2.098561413 10000000 4000000 29.81019524
2.098561413 6666666.667 4000000 34.19175331
2.098561413 5000000 4000000 39.11454333
2.098561413 4000000 4000000 44.77790363
2.098561413 20000000 5000000 12.84103441
2.098561413 10000000 5000000 21.15167943
2.098561413 6666666.667 5000000 32.22586497
2.098561413 5000000 5000000 36.92421258
2.027801524 20000000 4000000 7.660927596
2.027801524 10000000 4000000 15.50087117
2.027801524 6666666.667 4000000 20.39228109
2.027801524 5000000 4000000 26.88258166
2.027801524 20000000 5000000 3.451810632
2.027801524 10000000 5000000 6.935599076
2.027801524 6666666.667 5000000 7.797206873
2.027801524 5000000 5000000 9.56764204
2.027801524 4000000 5000000 12.25288174
2.027801524 20000000 6000000 3.035202491
2.027801524 10000000 6000000 5.996288183
2.027801524 6666666.667 6000000 6.893161231
2.027801524 5000000 6000000 8.3115416
2.027801524 4000000 6000000 9.261910241
1.96165779 20000000 4000000 5.0369538
1.96165779 10000000 4000000 5.70818901
1.96165779 6666666.667 4000000 6.162453266
1.96165779 5000000 4000000 7.018681618
1.96165779 4000000 4000000 7.181559262
1.96165779 20000000 5000000 2.810760086
1.96165779 10000000 5000000 3.317623361
1.96165779 6666666.667 5000000 4.796671917
1.96165779 5000000 5000000 6.791549489
1.96165779 4000000 5000000 7.053050295
1.96165779 20000000 6000000 2.673584235
1.96165779 10000000 6000000 3.723472611
1.96165779 6666666.667 6000000 4.309832131
1.96165779 5000000 6000000 5.626600759
1.96165779 4000000 6000000 6.116727982
1.96165779 20000000 7000000 2.493671681
1.96165779 10000000 7000000 3.102744414
1.96165779 6666666.667 7000000 3.863637043
1.96165779 5000000 7000000 4.22824388
1.96165779 4000000 7000000 4.97359589
1.899692765 20000000 4000000 2.131455708
1.899692765 10000000 4000000 2.719608376
1.899692765 6666666.667 4000000 3.802968856
1.899692765 5000000 4000000 5.688763236
1.899692765 4000000 4000000 6.884494347
1.899692765 20000000 6000000 0.970093274
1.899692765 10000000 6000000 2.022073657
1.899692765 6666666.667 6000000 2.342748359
1.899692765 5000000 6000000 3.597653366
1.899692765 4000000 6000000 4.490043544
1.899692765 20000000 5000000 1.198420834
1.899692765 10000000 5000000 2.383990771
1.899692765 6666666.667 5000000 2.681653402
1.899692765 5000000 5000000 3.298197587
1.899692765 4000000 5000000 5.248844166
1.841522581 10000000 4000000 2.104558482
1.841522581 6666666.667 4000000 2.527143784
1.841522581 5000000 4000000 3.451810632
1.841522581 4000000 4000000 3.964651068
EndDataSet;
MinFunction Sum(i=1:71)((y-a1*exp(-k1*exp(-e1*x1)*x2*x3^m1)+a2*exp(-k2*exp(-e2*x1)*x2*x3^m2))^2);
100=a1+a2;
k2-k1>0;
e2-e1>0;
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-28 11:59 , Processed in 0.071274 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表