SciPy - Curve Fitting and Regression
What will be the output of this code?
import numpy as np
from scipy.optimize import curve_fit
def model(x, a, b):
return a * np.exp(b * x)
xdata = np.array([0, 1, 2])
ydata = np.array([1, 2.7, 7.4])
params, _ = curve_fit(model, xdata, ydata)
print(np.round(params, 2))