Python curve_fit choice of bounds and initial condition affect the result
问题 I have a data set that is described by two free parameters which I want to determine using optimalization.curve_fit . The model is defined as follows def func(x, a, b,): return a*x*np.sqrt(1-b*x) And the fitting part as popt, pcov = opt.curve_fit(f = func, xdata = x_data, ydata= y_data, p0 = init_guess, bounds = ([a_min, b_min], [a_max, b_max])) The outcome of the solutions for a and b depends quite strong on my choice of init_guess , i.e. the initial guess and also on the choice of the