tangxun 发表于 2010-1-14 11:00

1stopt拟合效果改进

请教dingd大哥:

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

Parameters a1=,a2=,k1=,k2=,e1=,e2=,m1=,m2=;
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;
页: [1]
查看完整版本: 1stopt拟合效果改进