Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
057ba078
Unverified
Commit
057ba078
authored
Feb 17, 2022
by
Nikita Titov
Committed by
GitHub
Feb 17, 2022
Browse files
[docs] document rounding behavior of floating point numbers in categorical features (#5009)
parent
d31346f6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
0 deletions
+6
-0
docs/Advanced-Topics.rst
docs/Advanced-Topics.rst
+1
-0
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+2
-0
python-package/lightgbm/engine.py
python-package/lightgbm/engine.py
+2
-0
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+1
-0
No files found.
docs/Advanced-Topics.rst
View file @
057ba078
...
...
@@ -25,6 +25,7 @@ Categorical Feature Support
- Categorical features must be encoded as non-negative integers (``int``) less than ``Int32.MaxValue`` (2147483647).
It is best to use a contiguous range of integers started from zero.
Floating point numbers in categorical features will be rounded towards 0.
- Use ``min_data_per_group``, ``cat_smooth`` to deal with over-fitting (when ``#data`` is small or ``#category`` is large).
...
...
python-package/lightgbm/basic.py
View file @
057ba078
...
...
@@ -1159,6 +1159,7 @@ class Dataset:
Large values could be memory consuming. Consider using consecutive integers starting from zero.
All negative values in categorical features will be treated as missing values.
The output cannot be monotonically constrained with respect to a categorical feature.
Floating point numbers in categorical features will be rounded towards 0.
params : dict or None, optional (default=None)
Other parameters for Dataset.
free_raw_data : bool, optional (default=True)
...
...
@@ -3563,6 +3564,7 @@ class Booster:
Large values could be memory consuming. Consider using consecutive integers starting from zero.
All negative values in categorical features will be treated as missing values.
The output cannot be monotonically constrained with respect to a categorical feature.
Floating point numbers in categorical features will be rounded towards 0.
dataset_params : dict or None, optional (default=None)
Other parameters for Dataset ``data``.
free_raw_data : bool, optional (default=True)
...
...
python-package/lightgbm/engine.py
View file @
057ba078
...
...
@@ -109,6 +109,7 @@ def train(
Large values could be memory consuming. Consider using consecutive integers starting from zero.
All negative values in categorical features will be treated as missing values.
The output cannot be monotonically constrained with respect to a categorical feature.
Floating point numbers in categorical features will be rounded towards 0.
keep_training_booster : bool, optional (default=False)
Whether the returned Booster will be used to keep training.
If False, the returned value will be converted into _InnerPredictor before returning.
...
...
@@ -463,6 +464,7 @@ def cv(params, train_set, num_boost_round=100,
Large values could be memory consuming. Consider using consecutive integers starting from zero.
All negative values in categorical features will be treated as missing values.
The output cannot be monotonically constrained with respect to a categorical feature.
Floating point numbers in categorical features will be rounded towards 0.
fpreproc : callable or None, optional (default=None)
Preprocessing function that takes (dtrain, dtest, params)
and returns transformed versions of those.
...
...
python-package/lightgbm/sklearn.py
View file @
057ba078
...
...
@@ -262,6 +262,7 @@ _lgbmmodel_doc_fit = (
Large values could be memory consuming. Consider using consecutive integers starting from zero.
All negative values in categorical features will be treated as missing values.
The output cannot be monotonically constrained with respect to a categorical feature.
Floating point numbers in categorical features will be rounded towards 0.
callbacks : list of callable, or None, optional (default=None)
List of callback functions that are applied at each iteration.
See Callbacks in Python API for more information.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment