I use a simple polyfit order 2 to put a string in the sample data:
np.polyfit(x, y, 2)
which returns the odds.
Now I want to find the ambiguity of the inline string and tried to use the cov argument, which returns the 3x3 covariance matrix:
np.polyfit(x, y, 2, cov=True)
But I'm not sure how to calculate the uncertainty, which, according to my Google search, should be calculated by squaring the diagonal of the covariance matrix.
source share