I\'m using Python and Numpy to calculate a best fit polynomial of arbitrary degree. I pass a list of x values, y values, and the degree of the polynomial I want to fit (lin
From yanl (yet-another-library) sklearn.metrics has an r2_score function;
sklearn.metrics
from sklearn.metrics import r2_score coefficient_of_dermination = r2_score(y, p(x))