From 56c0af9516201bf7e67160b64366e2857a55e736 Mon Sep 17 00:00:00 2001 From: Paresh Mathur Date: Wed, 15 May 2019 21:52:00 +0200 Subject: [PATCH 1/5] fixes #13791, new documentation for categories parameter of OneHotEncoder --- sklearn/preprocessing/_encoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py index 6d11e7907984a..6e213b0935c91 100644 --- a/sklearn/preprocessing/_encoders.py +++ b/sklearn/preprocessing/_encoders.py @@ -367,7 +367,7 @@ def _handle_deprecations(self, X): msg = ( "Passing 'n_values' is deprecated in version 0.20 and will be " "removed in 0.22. You can use the 'categories' keyword " - "instead. 'n_values=n' corresponds to 'categories=[range(n)]'." + "instead. 'n_values=n' corresponds to 'categories=[range(n)]*n_features'." ) warnings.warn(msg, DeprecationWarning) self._legacy_mode = True From e65f0bf6958ffedfcef9c0b7673a230038573b29 Mon Sep 17 00:00:00 2001 From: Paresh Mathur Date: Wed, 15 May 2019 22:01:30 +0200 Subject: [PATCH 2/5] fixes #13881, clearer definition of fbeta_score --- sklearn/metrics/classification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/metrics/classification.py b/sklearn/metrics/classification.py index d1337bdc61aed..8a5c034786076 100644 --- a/sklearn/metrics/classification.py +++ b/sklearn/metrics/classification.py @@ -1066,7 +1066,7 @@ def fbeta_score(y_true, y_pred, beta, labels=None, pos_label=1, The F-beta score is the weighted harmonic mean of precision and recall, reaching its optimal value at 1 and its worst value at 0. - The `beta` parameter determines the weight of precision in the combined + The `beta` parameter determines the weight of recall in the combined score. ``beta < 1`` lends more weight to precision, while ``beta > 1`` favors recall (``beta -> 0`` considers only precision, ``beta -> inf`` only recall). From 9d2e29355be665ed550279b0f4fdc21669168490 Mon Sep 17 00:00:00 2001 From: Paresh Mathur Date: Sat, 18 May 2019 10:46:31 +0200 Subject: [PATCH 3/5] fix flake8 issues --- sklearn/preprocessing/_encoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py index 6e213b0935c91..d276dc16794c6 100644 --- a/sklearn/preprocessing/_encoders.py +++ b/sklearn/preprocessing/_encoders.py @@ -367,7 +367,7 @@ def _handle_deprecations(self, X): msg = ( "Passing 'n_values' is deprecated in version 0.20 and will be " "removed in 0.22. You can use the 'categories' keyword " - "instead. 'n_values=n' corresponds to 'categories=[range(n)]*n_features'." + "instead. 'n_values=n' corresponds to 'categories=[range(n)] * n_features'." ) warnings.warn(msg, DeprecationWarning) self._legacy_mode = True From fe9e6e5d23dcc23a6263f1b8a12362e5de200408 Mon Sep 17 00:00:00 2001 From: Paresh Mathur Date: Sun, 19 May 2019 09:35:01 +0200 Subject: [PATCH 4/5] fix flake8 issues with deprecation warning --- sklearn/preprocessing/_encoders.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py index d276dc16794c6..d707555af748a 100644 --- a/sklearn/preprocessing/_encoders.py +++ b/sklearn/preprocessing/_encoders.py @@ -367,7 +367,8 @@ def _handle_deprecations(self, X): msg = ( "Passing 'n_values' is deprecated in version 0.20 and will be " "removed in 0.22. You can use the 'categories' keyword " - "instead. 'n_values=n' corresponds to 'categories=[range(n)] * n_features'." + "instead. 'n_values=n' corresponds to " + "'categories = [range(n)] * n_features'." ) warnings.warn(msg, DeprecationWarning) self._legacy_mode = True From 4cf1b8299534e5c055b51fdebc3700de2bea4be0 Mon Sep 17 00:00:00 2001 From: Paresh Mathur Date: Sun, 19 May 2019 15:40:06 +0200 Subject: [PATCH 5/5] another try to fix flake8 issues in onehot documentation --- sklearn/preprocessing/_encoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py index d707555af748a..a8567e14db8fd 100644 --- a/sklearn/preprocessing/_encoders.py +++ b/sklearn/preprocessing/_encoders.py @@ -368,7 +368,7 @@ def _handle_deprecations(self, X): "Passing 'n_values' is deprecated in version 0.20 and will be " "removed in 0.22. You can use the 'categories' keyword " "instead. 'n_values=n' corresponds to " - "'categories = [range(n)] * n_features'." + "'categories=[range(n)] * n_features'." ) warnings.warn(msg, DeprecationWarning) self._legacy_mode = True