Skip to content

Commit 1652a70

Browse files
nikitasingh981jmschrei
authored andcommitted
[MRG] Updated title and versions supported in contributing documentation (scikit-learn#8824)
* Changed title and updated versions supported * Added back a line * Fixed definition of R^2 * Fixed 80 character limit!
1 parent 6f74a7c commit 1652a70

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

doc/developers/contributing.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -743,13 +743,12 @@ and the old behavior will be removed in version 0.20.
743743

744744
.. currentmodule:: sklearn
745745

746-
Python 3.x support
747-
------------------
746+
Python versions supported
747+
-------------------------
748748

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

754753
For most numerical algorithms, Python 3.x support is easy:
755754
just remember that ``print`` is a function and

sklearn/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,10 @@ class RegressorMixin(object):
358358
def score(self, X, y, sample_weight=None):
359359
"""Returns the coefficient of determination R^2 of the prediction.
360360
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
363363
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
365365
model can be arbitrarily worse). A constant model that always
366366
predicts the expected value of y, disregarding the input features,
367367
would get a R^2 score of 0.0.

0 commit comments

Comments
 (0)