逼近(负)指数函数时, 的指数模型如何lmfit
工作?
以下尝试遵循https://lmfit.github.io/lmfit-py/model.html,但未能提供正确的结果:
mod = lmfit.models.ExponentialModel()
pars = mod.guess([1, 0.5], x=[0, 1])
out = mod.fit([1, 0.5], pars, x=[0, 1])
out.eval(x=0) # result is 0.74999998273811308, should be 1
out.eval(x=1) # result is 0.75000001066995159, should be 0.5