r2 score interpretation code example Example: r2 score R^2 (coefficient of determination) regression score function.