Skip to content

Commit

Permalink
DOC Explaining integer+float behavior in HistGradientingBoosting (sci…
Browse files Browse the repository at this point in the history
  • Loading branch information
vijethmoudgalya committed Jun 16, 2023
1 parent c0d4f75 commit 20be4df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,9 @@ class HistGradientBoostingRegressor(RegressorMixin, BaseHistGradientBoosting):
For each categorical feature, there must be at most `max_bins` unique
categories, and each categorical value must be less then `max_bins - 1`.
Negative values for categorical features are treated as missing values.
All categorical values are converted to floating point numbers.
This means that categorical values of 1.0 and 1 are treated as
the same category.
Read more in the :ref:`User Guide <categorical_support_gbdt>`.
Expand Down Expand Up @@ -1628,6 +1631,9 @@ class HistGradientBoostingClassifier(ClassifierMixin, BaseHistGradientBoosting):
For each categorical feature, there must be at most `max_bins` unique
categories, and each categorical value must be less then `max_bins - 1`.
Negative values for categorical features are treated as missing values.
All categorical values are converted to floating point numbers.
This means that categorical values of 1.0 and 1 are treated as
the same category.
Read more in the :ref:`User Guide <categorical_support_gbdt>`.
Expand Down

0 comments on commit 20be4df

Please sign in to comment.