This documentation is for scikit-learn version 0.11-gitOther versions

Citing

If you use the software, please consider citing scikit-learn.

This page

8.17.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.

Parameters :

y_true : array-like

y_pred : array-like

Returns :

z : float

The R^2 score

Notes

This is not a symmetric function.

References

http://en.wikipedia.org/wiki/Coefficient_of_determination