SciPy - Curve Fitting and Regression
What is the issue with this custom model function when used with
curve_fit?
def model(x, a, b):
return a * x + b
xdata = [0, 1, 2]
ydata = [1, 3, 5]
popt, pcov = curve_fit(model, xdata, ydata, p0=[1])