x=[0.1875 0.3125 0.4375 0.625 0.875 1.125 1.375 1.625 1.875 2.25 2.75 3.25];
y=[24124 499 2221 648 97 31 7 2.5 1.7 0.388 0.113 0.026];
对x,y做线性拟合时用的公式为y=a*(x^b)*exp(-c*x);
如果我想进行非参数化拟合x,y。请问用Gauss怎么做?
不胜感激!
楼主: zhang5211314le
|
3358
7
[问答] 求用Gauss做非参数回归的方法,不胜感激 |
小学生 78%
-
|
回帖推荐@ Lession 7.6: Nadaraya-Watson Nonparametric Regression Estimation @
new;cls;library pgraph;
n=100;
x=seqa(0,(2*pi)/(n-1),n);
mx=sin(x);
y=mx+0.5*rndn(n,1);
othband=1.06*stdc(x)*(n^(-1/5)); @最优光滑参数@
xy(x,mx~y);
print " 显示sin(x)和y图形 press any key to continue...";
waitc;cls;
{px,py}=npreg(y,x,1,othband);
print " 显示sin(x)、y和NW核估计py图形 ";
xy(x,mx~py~y);
proc(2)=n ...
| ||
| ||
哗啦啦~
|
||
| ||
京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明 免责及隐私声明