Deprecate use_label_encoder in XGBClassifier. (#7822)

* Deprecate `use_label_encoder` in XGBClassifier.

* We have removed the encoder, now prepare to remove the indicator.
This commit is contained in:
Jiaming Yuan
2022-04-21 13:14:02 +08:00
committed by GitHub
parent 5815df4c46
commit 52d4eda786
8 changed files with 21 additions and 41 deletions

View File

@@ -36,9 +36,7 @@ parameter ``enable_categorical``:
.. code:: python
# Supported tree methods are `gpu_hist`, `approx`, and `hist`.
clf = xgb.XGBClassifier(
tree_method="gpu_hist", enable_categorical=True, use_label_encoder=False
)
clf = xgb.XGBClassifier(tree_method="gpu_hist", enable_categorical=True)
# X is the dataframe we created in previous snippet
clf.fit(X, y)
# Must use JSON/UBJSON for serialization, otherwise the information is lost.