From 73dfe4060f41cd9e58bbe826cfacd37d42d3f1d2 Mon Sep 17 00:00:00 2001 From: Sebastin Santy Date: Mon, 10 Jul 2017 17:49:14 +0530 Subject: [PATCH] Residual sum vs. regression sum --- sklearn/multioutput.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/multioutput.py b/sklearn/multioutput.py index 64e394272ffd7..6906d95869f2b 100644 --- a/sklearn/multioutput.py +++ b/sklearn/multioutput.py @@ -252,8 +252,8 @@ def partial_fit(self, X, y, sample_weight=None): def score(self, X, y, sample_weight=None): """Returns the coefficient of determination R^2 of the prediction. - The coefficient R^2 is defined as (1 - u/v), where u is the regression - sum of squares ((y_true - y_pred) ** 2).sum() and v is the residual + The coefficient R^2 is defined as (1 - u/v), where u is the residual + sum of squares ((y_true - y_pred) ** 2).sum() and v is the regression sum of squares ((y_true - y_true.mean()) ** 2).sum(). Best possible score is 1.0 and it can be negative (because the model can be arbitrarily worse). A constant model that always