Skip to content

Commit

Permalink
Small fixes for doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Sep 15, 2021
1 parent 8dd99d6 commit f21863d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion demo/guide-python/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def make_categorical(

def main() -> None:
# Use builtin categorical data support
# Must be pandas DataFrame or cudf DataFrame with categorical data
# For scikit-learn interface, the input data must be pandas DataFrame or cudf
# DataFrame with categorical features
X, y = make_categorical(100, 10, 4, False)
# Specify `enable_categorical` to True.
reg = xgb.XGBRegressor(tree_method="gpu_hist", enable_categorical=True)
Expand Down
3 changes: 1 addition & 2 deletions python-package/xgboost/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ def inner(preds: np.ndarray, dmatrix: DMatrix) -> Tuple[np.ndarray, np.ndarray]:
.. versionadded:: 1.5.0
Experimental support for categorical data. Do not set to true unless you are
interested in development. Only valid when `gpu_hist` and pandas dataframe are
used.
interested in development. Only valid when `gpu_hist` and dataframe are used.
kwargs : dict, optional
Keyword arguments for XGBoost Booster object. Full documentation of
Expand Down

0 comments on commit f21863d

Please sign in to comment.