Skip to content

[docs] unify language and make small improvements in some param descriptions #6618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update config.h
  • Loading branch information
StrikerRUS authored Aug 16, 2024
commit d4df529b58230ded5468503e40fd0bf92df4ee77
27 changes: 14 additions & 13 deletions include/LightGBM/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,31 +617,32 @@ struct Config {
// desc = **Note**: can be used only in CLI version
int snapshot_freq = -1;

// desc = used only with ``cpu`` and ``cuda`` device type
// desc = whether to use gradient quantization when training
// desc = enabling this will discretize (quantize) the gradients and hessians into bins of ``num_grad_quant_bins``
// desc = with quantized training, most arithmetics in the training process will be integer operations
// desc = gradient quantization can accelerate training, with little accuracy drop in most cases
// desc = **Note**: works only with ``cpu`` and ``cuda`` device type
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"can be used only ..." for something that is not supposed to work in other environments at all, "Note: works only ..." for something that is supposed to work in other environments but currently doesn't work (not implemented yet).

// desc = *New in version 4.0.0*
bool use_quantized_grad = false;

// desc = used only with ``cpu`` and ``cuda`` device type
// desc = used only if ``use_quantized_grad=true``
// desc = number of bins to quantization gradients and hessians
// desc = with more bins, the quantized training will be closer to full precision training
// desc = **Note**: works only with ``cpu`` and ``cuda`` device type
// desc = *New in version 4.0.0*
int num_grad_quant_bins = 4;

// desc = used only with ``cpu`` and ``cuda`` device type
// desc = used only if ``use_quantized_grad=true``
// desc = whether to renew the leaf values with original gradients when quantized training
// desc = renewing is very helpful for good quantized training accuracy for ranking objectives
// desc = **Note**: works only with ``cpu`` and ``cuda`` device type
// desc = *New in version 4.0.0*
bool quant_train_renew_leaf = false;

// desc = used only with ``cpu`` and ``cuda`` device type
// desc = used only if ``use_quantized_grad=true``
// desc = whether to use stochastic rounding in gradient quantization
// desc = **Note**: works only with ``cpu`` and ``cuda`` device type
// desc = *New in version 4.0.0*
bool stochastic_rounding = true;

Expand All @@ -655,16 +656,16 @@ struct Config {

// alias = linear_trees
// desc = fit piecewise linear gradient boosting tree
// 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 = the first tree has constant leaf values
// descl2 = categorical features are used for splits as normal but are not used in the linear models
// 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
// descl2 = **Note**: setting ``linear_tree=true`` significantly increases the memory use of LightGBM
// descl2 = **Note**: if you specify ``monotone_constraints``, constraints will be enforced when choosing the split points, but not when fitting the linear models on leaves
// desc = tree splits are chosen in the usual way, but the model at each leaf is linear instead of constant
// desc = the linear model at each leaf includes all the numerical features in that leaf's branch
// desc = the first tree has constant leaf values
// desc = categorical features are used for splits as normal but are not used in the linear models
// desc = 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
// desc = it is recommended to rescale data before training so that features have similar mean and standard deviation
// desc = **Note**: works only with ``cpu`` device type and ``serial`` tree learner
// desc = **Note**: ``regression_l1`` objective is not supported with linear tree boosting
// desc = **Note**: setting ``linear_tree=true`` significantly increases the memory use of LightGBM
// desc = **Note**: if you specify ``monotone_constraints``, constraints will be enforced when choosing the split points, but not when fitting the linear models on leaves
bool linear_tree = false;

// alias = max_bins
Expand Down