From e0447111ec30ee7c1f760dfcd496f0315aacbe64 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Amaral Date: Tue, 12 Oct 2021 16:09:34 -0300 Subject: [PATCH 1/3] [DOC] Remove mae-mse from docstrings --- sklearn/ensemble/_forest.py | 3 +-- sklearn/tree/_classes.py | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sklearn/ensemble/_forest.py b/sklearn/ensemble/_forest.py index 31ecfa8ee867f..81852677a2e72 100644 --- a/sklearn/ensemble/_forest.py +++ b/sklearn/ensemble/_forest.py @@ -2061,8 +2061,7 @@ class ExtraTreesRegressor(ForestRegressor): The default value of ``n_estimators`` changed from 10 to 100 in 0.22. - criterion : {"squared_error", "mse", "absolute_error", "mae"}, \ - default="squared_error" + criterion : {"squared_error", "absolute_error"}, default="squared_error" The function to measure the quality of a split. Supported criteria are "squared_error" for the mean squared error, which is equal to variance reduction as feature selection criterion, and "absolute_error" diff --git a/sklearn/tree/_classes.py b/sklearn/tree/_classes.py index 818563f0acf59..c59fcda975a9d 100644 --- a/sklearn/tree/_classes.py +++ b/sklearn/tree/_classes.py @@ -1038,8 +1038,8 @@ class DecisionTreeRegressor(RegressorMixin, BaseDecisionTree): Parameters ---------- - criterion : {"squared_error", "mse", "friedman_mse", "absolute_error", \ - "mae", "poisson"}, default="squared_error" + criterion : {"squared_error", "friedman_mse", "absolute_error", \ + "poisson"}, default="squared_error" The function to measure the quality of a split. Supported criteria are "squared_error" for the mean squared error, which is equal to variance reduction as feature selection criterion and minimizes the L2 @@ -1630,8 +1630,7 @@ class ExtraTreeRegressor(DecisionTreeRegressor): Parameters ---------- - criterion : {"squared_error", "mse", "friedman_mse", "mae"}, \ - default="squared_error" + criterion : {"squared_error", "friedman_mse"}, default="squared_error" The function to measure the quality of a split. Supported criteria are "squared_error" for the mean squared error, which is equal to variance reduction as feature selection criterion and "mae" for the From 3f52b5cc52c2cb2a8ce1bdfed04a6a7d0a01803e Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Amaral Date: Tue, 12 Oct 2021 16:48:48 -0300 Subject: [PATCH 2/3] [DOC] Remove ls lad least_squares from docstrings --- sklearn/ensemble/_gb.py | 4 ++-- .../ensemble/_hist_gradient_boosting/gradient_boosting.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sklearn/ensemble/_gb.py b/sklearn/ensemble/_gb.py index 7b66324d1f08b..783105f4f35c8 100644 --- a/sklearn/ensemble/_gb.py +++ b/sklearn/ensemble/_gb.py @@ -1474,8 +1474,8 @@ class GradientBoostingRegressor(RegressorMixin, BaseGradientBoosting): Parameters ---------- - loss : {'squared_error', 'ls', 'absolute_error', 'lad', 'huber', \ - 'quantile'}, default='squared_error' + loss : {'squared_error', 'absolute_error', 'huber', 'quantile'}, + default='squared_error' Loss function to be optimized. 'squared_error' refers to the squared error for regression. 'absolute_error' refers to the absolute error of regression and is a robust loss function. 'huber' is a diff --git a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py index d2a2b1ddde9e4..097ceeeadc588 100644 --- a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py +++ b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py @@ -1021,10 +1021,10 @@ class HistGradientBoostingRegressor(RegressorMixin, BaseHistGradientBoosting): Parameters ---------- - loss : {'squared_error', 'least_squares', 'absolute_error', \ - 'least_absolute_deviation', 'poisson'}, default='squared_error' + loss : {'squared_error', 'absolute_error', 'poisson'}, \ + default='squared_error' The loss function to use in the boosting process. Note that the - "least squares" and "poisson" losses actually implement + "squared error" and "poisson" losses actually implement "half least squares loss" and "half poisson deviance" to simplify the computation of the gradient. Furthermore, "poisson" loss internally uses a log-link and requires ``y >= 0``. From b2aad98b0119e2d9f667ec684020cb32e4819c6d Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Amaral Date: Tue, 12 Oct 2021 17:51:11 -0300 Subject: [PATCH 3/3] [DOC] fix missing end slash --- sklearn/ensemble/_gb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/ensemble/_gb.py b/sklearn/ensemble/_gb.py index 783105f4f35c8..34f651830fc0e 100644 --- a/sklearn/ensemble/_gb.py +++ b/sklearn/ensemble/_gb.py @@ -1474,7 +1474,7 @@ class GradientBoostingRegressor(RegressorMixin, BaseGradientBoosting): Parameters ---------- - loss : {'squared_error', 'absolute_error', 'huber', 'quantile'}, + loss : {'squared_error', 'absolute_error', 'huber', 'quantile'}, \ default='squared_error' Loss function to be optimized. 'squared_error' refers to the squared error for regression. 'absolute_error' refers to the absolute error of