File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -743,13 +743,12 @@ and the old behavior will be removed in version 0.20.
743
743
744
744
.. currentmodule :: sklearn
745
745
746
- Python 3.x support
747
- ------------------
746
+ Python versions supported
747
+ -------------------------
748
748
749
- All scikit-learn code should work unchanged in both Python 2.[67]
750
- and 3.2 or newer. Since Python 3.x is not backwards compatible,
751
- that may require changes to code and it certainly requires testing
752
- on both 2.7 and 3.2 or newer.
749
+ All scikit-learn code should work unchanged in both Python 2.7 and 3.4 or
750
+ newer. Since Python 3.x is not backwards compatible, that may require changes
751
+ to code and it certainly requires testing on both 2.7 and 3.4 or newer.
753
752
754
753
For most numerical algorithms, Python 3.x support is easy:
755
754
just remember that ``print `` is a function and
Original file line number Diff line number Diff line change @@ -358,10 +358,10 @@ class RegressorMixin(object):
358
358
def score (self , X , y , sample_weight = None ):
359
359
"""Returns the coefficient of determination R^2 of the prediction.
360
360
361
- The coefficient R^2 is defined as (1 - u/v), where u is the regression
362
- sum of squares ((y_true - y_pred) ** 2).sum() and v is the residual
361
+ The coefficient R^2 is defined as (1 - u/v), where u is the residual
362
+ sum of squares ((y_true - y_pred) ** 2).sum() and v is the total
363
363
sum of squares ((y_true - y_true.mean()) ** 2).sum().
364
- Best possible score is 1.0 and it can be negative (because the
364
+ The best possible score is 1.0 and it can be negative (because the
365
365
model can be arbitrarily worse). A constant model that always
366
366
predicts the expected value of y, disregarding the input features,
367
367
would get a R^2 score of 0.0.
You can’t perform that action at this time.
0 commit comments