Skip to content

Commit 6437645

Browse files
authored
[docs] add a note about DART in early_stopping docstring (#6846)
* [python-package] add a note about DART in early_stopping docstring * add note in R docs too
1 parent f7c641d commit 6437645

File tree

6 files changed

+20
-0
lines changed

6 files changed

+20
-0
lines changed

R-package/R/lightgbm.R

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
#' in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
7070
#' a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
7171
#' or \code{objective} (passed into \code{params}).
72+
#'
73+
#' \bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
74+
#' and early stopping will not be performed.
7275
#' @section Model serialization:
7376
#'
7477
#' LightGBM model objects can be serialized and de-serialized through functions such as \code{save}

R-package/man/lgb.cv.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R-package/man/lgb.train.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R-package/man/lgb_shared_params.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R-package/man/lightgbm.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python-package/lightgbm/callback.py

+5
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,11 @@ def early_stopping(
468468
To check only the first metric set ``first_metric_only`` to True.
469469
The index of iteration that has the best performance will be saved in the ``best_iteration`` attribute of a model.
470470
471+
.. note::
472+
473+
If using ``boosting_type="dart"``, this callback has no effect and early stopping
474+
will not be performed.
475+
471476
Parameters
472477
----------
473478
stopping_rounds : int

0 commit comments

Comments
 (0)