由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Science版 - Re: how to 数值拟合?
相关主题
再问:Gaussian model是什么东东?请教,怎么生成高斯分布的随机变量?
Re: 问一个土问题,什么是最小二乘法,怎么拟合曲线。Fortran is good!
Re: 再问一次这个弱问题Re: a statistical question
Re: nonlinear + regression fit in Mathematica 4.0Re: 非线性方程求根一问
绘图问题求教Help: what is the integral of delta(t)^2?
Re: 谁能帮我分析分析这个微分方程组?Re: [转载] 哈佛居然也捣浆糊! 赫赫, 想起了永动机
[转载]Matlab详细教程(61)Re: 极值问题请教
Re: HELP!!! DUE homework, no ideaRe: 激光光束质量因子 M^2 是怎么回事啊
相关话题的讨论汇总
话题: 拟合话题: 数值话题: method话题: 如下
进入Science版参与讨论
1 (共1页)
s***e
发帖数: 911
1

这个非线性拟合的理论我不清楚, 但是有点想法或许可以用得上:利用其中任意四个点
定出一组{a,b,c,d}来. 这是个点的选择可以有C_6^4种. 于是你就得到一系列可能
的{a,b,c,d}_i. 最后对个个a_i, b_i, c_i,d_i求平均.
直觉上这个求法应该不错, 是否最优就不清楚了.我在想想有没有别的办法.
s***e
发帖数: 911
2

主要不知道啥工具作这种非线性回归厉害啊...
我想偶们作物理的, 要用一个模型来拟合数据, 其实心里多半已经知道可行了. 要的只是
真正看看究竟贴近不贴近, 然后画图给别人看: 你看看, 在这组参数下就很不错.
酱子的话偶的办法就可以操作乐...
a**u
发帖数: 99
3
用MATHEMATICA3.0
程序如下:
<< Statistics`NonlinearFit`
data={{2950 , 0.3,0},
{2100, 0.5,0},
{1500 , 1.0,0},
{700 , 2.6,0},
{450 , 3.6,0},
{250, 7.0,0}};
NonlinearFit[data,
(y-b)^2-b^2 + a * ((x-c)^2-c^2) + d*x*y,
{y,x}, {a, b,c,d}]
结果如下:
-26.9712125285168768 +
3.30202057962278461*10^-6 (-4.13219427776865977*10^6 +
(-2032.77993835256554 + x)^2) + (-5.1933816082122135 + y)^2 + 0.
0160811666569762206 xy
c*w
发帖数: 4736
4
This method is not good.
for example, I have three datapoints:
{0.00000,0.00000} {1.00000,1.00000} {1.00000,1.00001}
and want a linear fit of y = a*x+b
then if use your method, a will be infinity rather than 1.
The math solution to this method is pretty complicated,
I spent a term learning a course on it, and what I could
tell now is that you should use stuffs like sufficient
statistic to do it. I've forgot most of the thing though :(
s***e
发帖数: 911
5

我这个办法肯定不很好,不过你这个例子不对, hehe...针对你这个例子我的办法一定
给出a=1. 这个问题里面你有三个实验点. 其中任取两个都可以定出a,b. 你这个例子
无论取那两个都是a=1, b=0.于是最后平均还是a=1, b=0.
我猜是我没说清楚,你误解了我的算法. 我这个算法的思想是:
平面上有N个点, 我用一个曲线模型R(t,P)来拟合.加入n P, 则我们根据实验点共可以产生C_N^n条可能的曲线. 最后对参数平均, 其实就是对这个
C_N^n条曲线作了平均.
假如我们的曲线根据的model是正确的, 假设真正的那个曲线是R(t,P0). 那么实验点
确定出来了曲线系宗就看成围绕R(t,P0)的随机波动. 假设这个分布是Gaussian的,
那么你知道平均正好对应最可几.
以上是偶的办法根据的一点儿道理乐:P

【在 c*w 的大作中提到】
: This method is not good.
: for example, I have three datapoints:
: {0.00000,0.00000} {1.00000,1.00000} {1.00000,1.00001}
: and want a linear fit of y = a*x+b
: then if use your method, a will be infinity rather than 1.
: The math solution to this method is pretty complicated,
: I spent a term learning a course on it, and what I could
: tell now is that you should use stuffs like sufficient
: statistic to do it. I've forgot most of the thing though :(

c*w
发帖数: 4736
6

You did not read carefully. The y of last point is 1.00001, rather
than 1.00000 , so the two points {1,1} and {1,1.00001} will give us
an infinite a = .00001/0 =infinity. :)
I understood it :)
Your argument is kind of justified, but that method will mess things
up if the points you took are not uniform, just as what my example
showed.

【在 s***e 的大作中提到】
:
: 我这个办法肯定不很好,不过你这个例子不对, hehe...针对你这个例子我的办法一定
: 给出a=1. 这个问题里面你有三个实验点. 其中任取两个都可以定出a,b. 你这个例子
: 无论取那两个都是a=1, b=0.于是最后平均还是a=1, b=0.
: 我猜是我没说清楚,你误解了我的算法. 我这个算法的思想是:
: 平面上有N个点, 我用一个曲线模型R(t,P)来拟合.加入n: P, 则我们根据实验点共可以产生C_N^n条可能的曲线. 最后对参数平均, 其实就是对这个
: C_N^n条曲线作了平均.
: 假如我们的曲线根据的model是正确的, 假设真正的那个曲线是R(t,P0). 那么实验点
: 确定出来了曲线系宗就看成围绕R(t,P0)的随机波动. 假设这个分布是Gaussian的,

1 (共1页)
进入Science版参与讨论
相关主题
Re: 激光光束质量因子 M^2 是怎么回事啊绘图问题求教
Re: Look for Gaussian Derivative Filter for 3D imagesRe: 谁能帮我分析分析这个微分方程组?
Re: 学过信号处理,光电,物理的帮我看看这句话是啥意思[转载]Matlab详细教程(61)
Re: First principle (ab initio)Re: HELP!!! DUE homework, no idea
再问:Gaussian model是什么东东?请教,怎么生成高斯分布的随机变量?
Re: 问一个土问题,什么是最小二乘法,怎么拟合曲线。Fortran is good!
Re: 再问一次这个弱问题Re: a statistical question
Re: nonlinear + regression fit in Mathematica 4.0Re: 非线性方程求根一问
相关话题的讨论汇总
话题: 拟合话题: 数值话题: method话题: 如下