This page

Citing

Please consider citing the scikit-learn.

9.8.2.1. sklearn.metrics.r2_score

sklearn.metrics.r2_score(y_true, y_pred)

R^2 (coefficient of determination) regression score function

Best possible score is 1.0, lower values are worse.

Note: not a symmetric function.

return the R^2 score

Parameters :

y_true : array-like

y_pred : array-like