python中的正交距离回归:返回值的含义 [英] Orthogonal distance regression in python: meaning of returned values
问题描述
我遵循 正交距离回归方法来拟合因变量和自变量均存在误差的数据.
I am following the Orthogonal distance regression method to fit data with errors on both the dependent and independent variables.
我用一条简单的直线拟合数据,我的模型是y = ax + b
.
I am fitting the data with a simple straight line, my model is y = ax + b
.
现在,我可以编写代码并绘制拟合数据的线,但我无法读取结果:
Now, I am able to write the code and plot the line fitting the data, but I am NOT able to read the results:
Beta: [ 2.08346947 0.0024333 ]
Beta Std Error: [ 0.03654482 0.00279946]
Beta Covariance: [[ 2.06089823e-03 -9.99220260e-05]
[ -9.99220260e-05 1.20935366e-05]]
Residual Variance: 0.648029925546
Inverse Condition #: 0.011825289654
Reason(s) for Halting:
Sum of squares convergence
Beta
只是包含我的模型(a, b)
和 Beta Std Error
参数值的数组,相关的错误.
The Beta
is just the array containing the values of the parameters of my model (a, b)
, and Beta Std Error
, the associated errors.
关于其他值,我不知道它们的含义.
Regarding the other values, I don't know their meaning.
特别是,我想知道哪个表示适合度,例如 chi-square 当一个只适合因变量的错误时.
Especially, I would like to know which one is indicative of a goodness-of-fit, something like the chi-square when one fits with the errors only on the dependent variable.
推荐答案
Beta Covariance
是 协方差矩阵.它可以被认为是一个矩阵,描述了你的两个参数相互之间的相互联系.
Beta Covariance
is the covariance matrix of your fitted parameters. It can be thought of as a matrix describing out inter-connected your two parameters are with respect to both themselves and each other.
Residual Variance
我认为是拟合优度的一种度量,其中值越小,对数据的拟合越好.
Residual Variance
I believe is a measure of the goodness-of-fit where the smaller the value, the better the fit to your data.
逆条件
是条件数<的逆 (1/x)/a>.条件数定义了拟合函数对输入变化的敏感程度.
Inverse Condition
is the inverse (1/x) of the condition number. The condition number defines how sensitive your fitted function is to changes in the input.
scipy.odr
是一个更旧的 FORTRAN77 包的包装器,称为 ODRPACK.ODRPACK 的文档实际上可以在 scipy 网站上找到.这可能有助于您了解您需要了解的内容,因为它包含参数的数学描述.
scipy.odr
is a wrapper around a much older FORTRAN77 package known as ODRPACK. The documentation for ODRPACK can actually be found on on the scipy website. This may help you in understanding what you need to know as it contains the mathematical descriptions of the parameters.
这篇关于python中的正交距离回归:返回值的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!