Commit d1fd52e9 authored by Misha Lisovyi's avatar Misha Lisovyi Committed by Guolin Ke
Browse files

[python][docs] add info on adaptive learning rate in the sklearn API (#1354)

* add info on adaptive learning rate in the sklearn API

* adjust learning rate documentation following the PR discussion

* fix early stopping documentation

* improve wording

* fixing trailing spaces
parent 0f3d90e7
......@@ -196,8 +196,7 @@ The model will train until the validation score stops improving.
Validation error needs to improve at least every ``early_stopping_rounds`` to continue training.
If early stopping occurs, the model will have an additional field: ``bst.best_iteration``.
Note that ``train()`` will return a model from the last iteration, not the best one.
And you can set ``num_iteration=bst.best_iteration`` when saving model.
Note that ``train()`` will return a model from the best iteration.
This works with both metrics to minimize (L2, log loss, etc.) and to maximize (NDCG, AUC).
Note that if you specify more than one evaluation metric, all of them will be used for early stopping.
......
......@@ -149,6 +149,9 @@ class LGBMModel(_LGBMModelBase):
Maximum tree depth for base learners, -1 means no limit.
learning_rate : float, optional (default=0.1)
Boosting learning rate.
You can use ``callbacks`` parameter of ``fit`` method to shrink/adapt learning rate
in training using ``reset_parameter`` callback.
Note, that this will ignore the ``learning_rate`` argument in training.
n_estimators : int, optional (default=100)
Number of boosted trees to fit.
subsample_for_bin : int, optional (default=50000)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment