8000 DOC Explaining integer+float behavior in HistGradientingBoosting (#26… · scikit-learn/scikit-learn@20be4df · GitHub
[go: up one dir, main page]

Skip to content

Commit 20be4df

Browse files
DOC Explaining integer+float behavior in HistGradientingBoosting (#26529)
1 parent c0d4f75 commit 20be4df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,9 @@ class HistGradientBoostingRegressor(RegressorMixin, BaseHistGradientBoosting):
12711271
For each categorical feature, there must be at most `max_bins` unique
12721272
categories, and each categorical value must be less then `max_bins - 1`.
12731273
Negative values for categorical features are treated as missing values.
1274+
All categorical values are converted to floating point numbers.
1275+
This means that categorical values of 1.0 and 1 are treated as
1276+
the same category.
12741277
12751278
Read more in the :ref:`User Guide <categorical_support_gbdt>`.
12761279
@@ -1628,6 +1631,9 @@ class HistGradientBoostingClassifier(ClassifierMixin, BaseHistGradientBoosting):
16281631
For each categorical feature, there must be at most `max_bins` unique
16291632
categories, and each categorical value must be less then `max_bins - 1`.
16301633
Negative values for categorical features are treated as missing values.
1634+
All categorical values are converted to floating point numbers.
1635+
This means that categorical values of 1.0 and 1 are treated as
1636+
the same category.
16311637
16321638
Read more in the :ref:`User Guide <categorical_support_gbdt>`.
16331639

0 commit comments

Comments
 (0)
0