I`m using scipy.optimize.curve_fit for fitting a sigmoidal curve to data. I need to bound one of parameters from [-3, 0.5] and [0.5, 3.0]
I tried fit curve without bounds, and next if parameter is lower than zero, I fit once more with bounds [-3, 0.5] and in contrary with[0.5, 3.0]
Is it possible, to bound function curve_fit with two intervals?
curve_fit
, but you might be interested in lmfit package which provides exactly this functionality. – Vlas Sokolovlmfit
. Perhaps you can try to create two dependent parameters where one is scaled by a factor of-1
from the other? – Vlas Sokolov