1stOpt 6參數(shù)、SharedModel 求大蝦代跑一次。。。
SharedModel;
Variable x,y(2);//y1,y2;
Parameter a,b,c,d,e,f,;
Constant epsilon=0.3921,h0=6.3,R=125,Sf=0.03143,VR=1308.33;
ConstStr h1=h0*(1-epsilon),Delta_h=h0-h1,
Lc=sqrt(R*Delta_h-(Delta_h^2)/4),Re=R+(Lc^2)*(2*Sf+Sf^2)/Delta_h,
z0=Re+h1/2,z=z0-sqrt(Re^2-x^2),
Vx=h1*VR*(1+Sf)/(2*z),delta_f=15+9.2*epsilon^0.11,
p1=exp(a*x/z),p2=-(delta_f/z)*sqrt(Re^2-x^2),p3=(b*x/(z^2))*(Vx-VR),
p4=-(delta_f*x/z^2)*((-x/2)*sqrt(Re^2-x^2)+((Re^2)/2)*(arcsin(x/Re))),
p5=-a*b*(Vx-VR)*x^2/(2*z^3)+delta_f*(1+2*Re/h1);
Function y1=p1*(p2+p3+p4+p5);
y2=d*y1+e*(f*Vx-VR)/z;
Data;
//x,y1,y2
1.12891986062718e+000 6.40830449826990e+001 3.19723183391004e+001
2.25783972125436e+000 1.00069204152249e+002 3.47404844290657e+001
3.76306620209059e+000 8.56747404844291e+001 4.13840830449827e+001
5.01742160278746e+000 8.06920415224914e+001 2.58823529411765e+001
6.39721254355401e+000 7.62629757785467e+001 2.25605536332180e+001
7.77700348432056e+000 6.68512110726644e+001 1.75778546712803e+001
8.96864111498258e+000 5.96539792387543e+001 9.68858131487885e-001
1.02229965156794e+001 5.57785467128028e+001 -1.61937716262976e+001
1.16655052264808e+001 5.35640138408304e+001 -2.83737024221453e+001
1.28571428571429e+001 5.35640138408304e+001 -3.05882352941176e+001
1.42369337979094e+001 5.46712802768166e+001 -3.44636678200692e+001
1.54285714285714e+001 4.85813148788927e+001 -1.95155709342561e+001
1.67456445993031e+001 4.30449826989619e+001 -1.01038062283737e+001
1.75609756097561e+001 4.35986159169550e+001 -4.01384083044982e+000
返回小木蟲查看更多
京公網(wǎng)安備 11010802022153號
你定義了參數(shù)“c”,公式中哪兒出現(xiàn)了?
均方差(RMSE):20.8520934295763
殘差平方和(SSE):12174.6744110818
相關(guān)系數(shù)(R): 0.415185194791912
相關(guān)系數(shù)之平方(R^2): 0.172378745974398
確定系數(shù)(DC): -0.53357055375487
F統(tǒng)計(F-Statistic): 0.774618317230215
參數(shù) 最佳估算
-------------------- -------------
a -0.221601780470467
b -0.0211737707699377
d -0.474027457665805
e 0.169126416204592
f 1.45632858757723
不好意思,更正如下:
SharedModel;
Variable x,y(2);//y1,y2;
Parameter a,b,c,d,e,f,;
Constant epsilon=0.3921,h0=6.3,R=125,Sf=0.03143,VR=1308.33;
ConstStr h1=h0*(1-epsilon),Delta_h=h0-h1,
Lc=sqrt(R*Delta_h-(Delta_h^2)/4),Re=R+(Lc^2)*(2*Sf+Sf^2)/Delta_h,
z0=Re+h1/2,z=z0-sqrt(Re^2-x^2),
Vx=h1*VR*(1+Sf)/(2*z),delta_f=15+9.2*epsilon^0.11,
p1=exp(a*x/z),p2=-(delta_f/z)*sqrt(Re^2-x^2),p3=(b*x/(z^2))*(c*Vx-VR),
p4=-(delta_f*x/z^2)*((-x/2)*sqrt(Re^2-x^2)+((Re^2)/2)*(arcsin(x/Re))),
p5=-a*b*(c*Vx-VR)*x^2/(2*z^3)+delta_f*(1+2*Re/h1);
Function y1=p1*(p2+p3+p4+p5);
y2=d*y1+e*(f*Vx-VR)/z;
Data;
//x,y1,y2
1.12891986062718e+000 6.40830449826990e+001 3.19723183391004e+001
2.25783972125436e+000 1.00069204152249e+002 3.47404844290657e+001
3.76306620209059e+000 8.56747404844291e+001 4.13840830449827e+001
5.01742160278746e+000 8.06920415224914e+001 2.58823529411765e+001
6.39721254355401e+000 7.62629757785467e+001 2.25605536332180e+001
7.77700348432056e+000 6.68512110726644e+001 1.75778546712803e+001
8.96864111498258e+000 5.96539792387543e+001 9.68858131487885e-001
1.02229965156794e+001 5.57785467128028e+001 -1.61937716262976e+001
1.16655052264808e+001 5.35640138408304e+001 -2.83737024221453e+001
1.28571428571429e+001 5.35640138408304e+001 -3.05882352941176e+001
1.42369337979094e+001 5.46712802768166e+001 -3.44636678200692e+001
1.54285714285714e+001 4.85813148788927e+001 -1.95155709342561e+001
1.67456445993031e+001 4.30449826989619e+001 -1.01038062283737e+001
1.75609756097561e+001 4.35986159169550e+001 -4.01384083044982e+000
,
均方差(RMSE):10.3099456356208
殘差平方和(SSE):2976.25941226475
相關(guān)系數(shù)(R): 0.898725556300563
相關(guān)系數(shù)之平方(R^2): 0.807707625547757
確定系數(shù)(DC): 0.763694912872346
F統(tǒng)計(F-Statistic): 6.60075351724251
參數(shù) 最佳估算
-------------------- -------------
a -0.883347683676744
b -1.4382935276553
c 0.867127655452422
d 0.532124669771594
e 0.268138053507002
f 0.909792395686838
您好,請問一下,我定義了y1的值,擬合的時候為什么還把y1當做未定義的參數(shù)呢?
Variable x,y2
Parameter d,e,f;
Constant epsilon=0.3921,h0=6.3,R=125,Sf=0.03143,VR=1308.33,
y1(1:14)=[60.6230417,81.5505891,90.8638391,89.1365064,82.5600593,
74.2595016,67.0931699,60.2069028,53.4382785,48.8087444,
44.4447673,41.4230248,8.7552541,37.4008104];
ConstStr h1=h0*(1-epsilon),Delta_h=h0-h1,
Lc=sqrt(R*Delta_h-(Delta_h^2)/4),Re=R+(Lc^2)*(2*Sf+Sf^2)/Delta_h,
z0=Re+h1/2,z=z0-sqrt(Re^2-x^2),
Vx=h1*VR*(1+Sf)/(2*z);
Function y2=d*y1+e*(f*Vx-VR)/z;
Data;
x,y2
1.12891986062718e+000 3.19723183391004e+001
2.25783972125436e+000 3.47404844290657e+001
3.76306620209059e+000 4.13840830449827e+001
5.01742160278746e+000 2.58823529411765e+001
6.39721254355401e+000 2.25605536332180e+001
7.77700348432056e+000 1.75778546712803e+001
8.96864111498258e+000 9.68858131487885e-001
1.02229965156794e+001 -1.61937716262976e+001
1.16655052264808e+001 -2.83737024221453e+001
1.28571428571429e+001 -3.05882352941176e+001
1.42369337979094e+001 -3.44636678200692e+001
1.54285714285714e+001 -1.95155709342561e+001
1.67456445993031e+001 -1.01038062283737e+001
1.75609756097561e+001 -4.01384083044982e+000