[backport] Fix inference with categorical feature. (#8591) (#8602) (#8638)

* Fix inference with categorical feature. (#8591)

* Fix windows build on buildkite. (#8602)

* workaround.
This commit is contained in:
Jiaming Yuan
2023-01-06 01:17:49 +08:00
committed by GitHub
parent 1a834b2b85
commit 067b704e58
7 changed files with 79 additions and 31 deletions

View File

@@ -138,11 +138,11 @@ Miscellaneous
By default, XGBoost assumes input categories are integers starting from 0 till the number
of categories :math:`[0, n\_categories)`. However, user might provide inputs with invalid
values due to mistakes or missing values. It can be negative value, integer values that
can not be accurately represented by 32-bit floating point, or values that are larger than
actual number of unique categories. During training this is validated but for prediction
it's treated as the same as missing value for performance reasons. Lastly, missing values
are treated as the same as numerical features (using the learned split direction).
values due to mistakes or missing values in training dataset. It can be negative value,
integer values that can not be accurately represented by 32-bit floating point, or values
that are larger than actual number of unique categories. During training this is
validated but for prediction it's treated as the same as not-chosen category for
performance reasons.
**********