From 125bc812f81ec908ed365d63cc8db97ff7699975 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Thu, 14 Dec 2023 23:29:19 +0800 Subject: [PATCH] [doc] Reference `enable_categorical` doc in sklearn. (#9884) --- python-package/xgboost/core.py | 7 ++++--- python-package/xgboost/sklearn.py | 8 +------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index 1bddadbbe..2e72dbbd2 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -824,9 +824,10 @@ class DMatrix: # pylint: disable=too-many-instance-attributes,too-many-public-m Experimental support of specializing for categorical features. - If passing 'True' and 'data' is a data frame (from supported libraries - such as Pandas or Modin), columns of categorical types will automatically - be set to be of categorical type (feature_type='c') in the resulting DMatrix. + If passing 'True' and 'data' is a data frame (from supported libraries such + as Pandas, Modin or cuDF), columns of categorical types will automatically + be set to be of categorical type (feature_type='c') in the resulting + DMatrix. If passing 'False' and 'data' is a data frame with categorical columns, it will result in an error being thrown. diff --git a/python-package/xgboost/sklearn.py b/python-package/xgboost/sklearn.py index 748b26cf6..ded37881f 100644 --- a/python-package/xgboost/sklearn.py +++ b/python-package/xgboost/sklearn.py @@ -276,13 +276,7 @@ __model_doc = f""" enable_categorical : bool - .. versionadded:: 1.5.0 - - .. note:: This parameter is experimental - - Experimental support for categorical data. When enabled, cudf/pandas.DataFrame - should be used to specify categorical data type. Also, JSON/UBJSON - serialization format is required. + See the same parameter of :py:class:`DMatrix` for details. feature_types : Optional[FeatureTypes]