how to constrain scipy curve_fit in positive result
One of the simpler ways to handle negative value in y, is to make a log transformation. Get the best fit for log transformed y, then do exponential transformation for actual error in the fit or for any new value prediction.
I'm using scipy curve_fit to curve a line for retention. however, I found the result line may produce negative number. how can i add some constrain?
the 'bounds' only constrain parameters not the results y