旧的scipy.optimize.leastsq函数返回一个cov_x
参数:
cov_x: ndarray
Uses the fjac and ipvt optional outputs to construct an estimate of the jacobian around the solution. None if a singular matrix encountered (indicates very flat curvature in some direction). This matrix must be multiplied by the residual variance to get the covariance of the parameter estimates – see curve_fit.
用于估计参数估计的方差。在
这个参数在新的scipy.optimize.least_squares中的等价物是什么?有:
jac : ndarray, sparse matrix or LinearOperator, shape (m, n)
Modified Jacobian matrix at the solution, in the sense that J^T J is a Gauss-Newton approximation of the Hessian of the cost function. The type is the same as the one used by the algorithm.
但这并不是真正的等价物。在
我不认为有明显的对应。
jac
不一样。它是雅可比矩阵的估计,雅可比矩阵是用来计算梯度的导数,用来优化最小结果。在您可以使用^{} 执行最小二乘回归,这将返回协方差矩阵。在
另请参见^{} ,它也做最小二乘法,并返回与协方差相关的相关系数。在
相关问题 更多 >
编程相关推荐