更新时间:2022-04-03 03:19:24
在日志空间中对模型进行可能的逐步参数化是这样的:
A possible stepwise parametrisation of your model in log-space is something like:
(x>q)*((x-q)*a)+(x<q)*((x-q)*c)+b
其中q
是纽结的位置,a
和c
是两个零件的斜率,b
是全局y偏移.由于模型具有不连续性,因此基于梯度的最小化器可能不是找到***拟合的***选择.尽管如此,我同时尝试了scipy.optimize.leastsq
和scipy.odr
并获得了良好的结果.
Where q
is the position of the kink, a
, and c
are the slopes of both parts and b
is a global y-offset. Since the model has a discontinuity a gradient based minimizer might not be the best choice to find a best fit. Nevertheless I tried both scipy.optimize.leastsq
and scipy.odr
and got good results.