且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 scipy.odr 估计拟合优度?

更新时间:2021-09-16 01:47:07

Output 是所谓的拟合卡方值,这是一种流行的选择拟合统计.不过,对于非线性拟合来说有些问题.您可以直接查看残差(out.delta 用于 X 残差,out.eps 用于 Y残差).如链接论文中所建议的那样,实施交叉验证或引导方法来确定拟合优度,留给读者作为练习.

The res_var attribute of the Output is the so-called reduced Chi-square value for the fit, a popular choice of goodness-of-fit statistic. It is somewhat problematic for non-linear fitting, though. You can look at the residuals directly (out.delta for the X residuals and out.eps for the Y residuals). Implementing a cross-validation or bootstrap method for determining goodness-of-fit, as suggested in the linked paper, is left as an exercise for the reader.