幂函数拟合
我想将幂函数拟合到数据集。我正在使用这种方法: http://mathworld.wolfram.com/LeastSquaresFittingPowerLaw.html
但结果不可接受:b = -0,001901,a = 7,26
我的数据集:
8553600 458.2
17193600 373.6
25833600 694.16
34646400 738.33
44064000 817.89
54259200 1040.67
67910400 1032.69
76291200 1222.1
84844800 1245.65
94089600 1217.44
102211200 1579.38
110592000 1859.24
118886400 1711.67
127612800 2303.62
136684800 2658.26
219196800 3669.23
225676800 3525.02
225763200 3749.27
这种方法是否不足,或者我犯了错误?有更好的解决方案来做到这一点吗?
I want to fit a power function to a dataset. I'm using this method: http://mathworld.wolfram.com/LeastSquaresFittingPowerLaw.html
But the result is not acceptable: b = -0,001901, a = 7,26
My dataset:
8553600 458.2
17193600 373.6
25833600 694.16
34646400 738.33
44064000 817.89
54259200 1040.67
67910400 1032.69
76291200 1222.1
84844800 1245.65
94089600 1217.44
102211200 1579.38
110592000 1859.24
118886400 1711.67
127612800 2303.62
136684800 2658.26
219196800 3669.23
225676800 3525.02
225763200 3749.27
Is this method inadequate, or did i make a miastake? Is there a better solution to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
拟合方法是“垃圾输入,垃圾输出”方法:您应该首先说服自己,存在一种类似于您要尝试拟合的关系。在你的情况下,制作一个散点图,看看它是否看起来像一个幂函数。可能只是您必须添加一个常数,或者选择了错误的指数。一般来说,无法轻松估计关系。最好的开始方法是找到为什么某种关系应该成立的理论论据,并尝试估计该关系的参数。
Fitting methods are "garbage in, garbage out" methods: you should first convince yourself that there is a relation like the one you're trying to fit. In you case, make a scatter plot, and see if it looks like a power function. It just might be that you have to add a constant, or chose the wrong exponent. In general there's no way to estimate a relation easily. The best way to start is to find theoretical arguments why a certain relation should hold, and try to estimate the parameters of that relation.
您的数据看起来更像是线性函数而不是幂律。通过使用
f(x) = a*x+b
进行拟合,您可以获得更好的拟合效果。Your data looks more like a linear function than a power law. You would obtain a better fit by fitting it with
f(x) = a*x+b
.我认为你只是错误地实施了它。
B 的分母是
看起来像你做的那样
I think you just implemented it wrong.
The denominator for B is
whereas it looks like you did