计算拟合函数的面积以与结果进行比较 - Mathematica
哈!
我花了很多时间阅读 Mathematica 的文档中心和 stackoverflow(以及其他网站),但我没有找到我的问题的任何答案:How in Mathematica I can Compare fields (quantitatively) of function (to be精确 - 结果)及其拟合。我想对我的适合程度进行一些数值估计。功能当然是3D的。
干杯,
约翰
H!
I've spent a lot of time reading Mathematica's Document Center and stackoverflow (among other sites), but I haven't found any answer to my question: How in Mathematica I can compare areas (quantitatively) of function (to be precise - results) and its fit. I'd like to get some numerical estimation of my fit. The function of course is in 3D.
Cheers,
John
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果实际目标是估计您的拟合程度,那么您不需要计算任何“面积” - Mathematica 内置了由 LinearModelFit[...] 和 NonlinearModelFit[...] 提供的分析。让我们构建一些分散在高斯曲面周围的数据集:
引入高斯曲面模型来拟合这些数据:
现在,进行非线性回归:
获取并绘制最佳拟合:
函数 nlm[…] 包含大量信息:
以下是与您的请求相关的一些属性:
谢谢,
维塔利
If the actual goal is to estimate how good your fit is, then you do not need to calculate any "areas" - Mathematica has built in analysis offered by LinearModelFit[...] and NonlinearModelFit[...]. Let's make up some dataset scattered around a Gaussian surface:
Introduce a Gaussian surface model to fit these data:
Now, do the nonlinear regression:
Obtain and plot the best fit:
The function nlm[…] contains a lot of information:
Here are few properties relevant to your request:
Thanks,
Vitaliy