Unverified Commit 6437645c authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[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
parent f7c641d9
......@@ -69,6 +69,9 @@
#' in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
#' a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
#' or \code{objective} (passed into \code{params}).
#'
#' \bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
#' and early stopping will not be performed.
#' @section Model serialization:
#'
#' LightGBM model objects can be serialized and de-serialized through functions such as \code{save}
......
......@@ -134,6 +134,9 @@ Cross validation logic used by LightGBM
in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
or \code{objective} (passed into \code{params}).
\bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
and early stopping will not be performed.
}
\examples{
......
......@@ -118,6 +118,9 @@ Low-level R interface to train a LightGBM model. Unlike \code{\link{lightgbm}},
in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
or \code{objective} (passed into \code{params}).
\bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
and early stopping will not be performed.
}
\examples{
......
......@@ -87,6 +87,9 @@ Parameter docs shared by \code{lgb.train}, \code{lgb.cv}, and \code{lightgbm}
in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
or \code{objective} (passed into \code{params}).
\bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
and early stopping will not be performed.
}
\section{Model serialization}{
......
......@@ -143,5 +143,8 @@ High-level R interface to train a LightGBM model. Unlike \code{\link{lgb.train}}
in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
or \code{objective} (passed into \code{params}).
\bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
and early stopping will not be performed.
}
......@@ -468,6 +468,11 @@ def early_stopping(
To check only the first metric set ``first_metric_only`` to True.
The index of iteration that has the best performance will be saved in the ``best_iteration`` attribute of a model.
.. note::
If using ``boosting_type="dart"``, this callback has no effect and early stopping
will not be performed.
Parameters
----------
stopping_rounds : int
......
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