Skip to content

Commit

Permalink
add note on missing value types for R
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jan 15, 2021
1 parent 3c3615d commit 302a71c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/Parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Core Parameters

- categorical features are used for splits as normal but are not used in the linear models

- missing values must be encoded as ``np.nan`` (Python) or ``NA`` (CLI), not ``0``
- missing values should not be encoded as ``0``. Use ``np.nan`` for Python, ``NA`` for the CLI, and ``NA``, ``NA_real_``, or ``NA_integer_`` for R

- it is recommended to rescale data before training so that features have similar mean and standard deviation

Expand Down
2 changes: 1 addition & 1 deletion include/LightGBM/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct Config {
// descl2 = tree splits are chosen in the usual way, but the model at each leaf is linear instead of constant
// descl2 = the linear model at each leaf includes all the numerical features in that leaf's branch
// descl2 = categorical features are used for splits as normal but are not used in the linear models
// descl2 = missing values must be encoded as ``np.nan`` (Python) or ``NA`` (CLI), not ``0``
// descl2 = missing values should not be encoded as ``0``. Use ``np.nan`` for Python, ``NA`` for the CLI, and ``NA``, ``NA_real_``, or ``NA_integer_`` for R
// descl2 = it is recommended to rescale data before training so that features have similar mean and standard deviation
// descl2 = **Note**: only works with CPU and ``serial`` tree learner
// descl2 = **Note**: ``regression_l1`` objective is not supported with linear tree boosting
Expand Down

0 comments on commit 302a71c

Please sign in to comment.