[doc] Reference enable_categorical doc in sklearn. (#9884)

This commit is contained in:
Jiaming Yuan 2023-12-14 23:29:19 +08:00 committed by GitHub
parent 1aa8c8d9be
commit 125bc812f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 10 deletions

View File

@ -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.

View File

@ -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]