SciPy - Curve Fitting and Regression
Given the code:
What is the output printed?
import numpy as np from scipy import polyfit, polyval x = np.array([0, 1, 2, 3]) y = np.array([1, 3, 7, 13]) coeffs = polyfit(x, y, 2) fitted = polyval(coeffs, x) print(fitted)
What is the output printed?
