
[英]Scipy.least_squares giving "ValueError: Residuals are not finite in the initial point." when the initial evaluation of the error function is finite
我正在使用 scipy.least_squares 最小化算法将复杂的 model 拟合到某些数据。 model 本身使用正向欧拉方法求解微分方程,在 3 组不同的初始条件下,每组对应于我试图拟合的一组数据。 错误 function 计算计算每组初始条件的数据和模拟之间的差异并将它们连接起来。 目 ...