From 96266748fafd4e79d973621da901aa9216bcdfcf Mon Sep 17 00:00:00 2001 From: Sebastian Fischer Date: Tue, 25 Jun 2024 12:33:35 +0200 Subject: [PATCH] docs --- R/LearnerClassifXgboost.R | 4 ++-- R/LearnerRegrXgboost.R | 2 +- man/mlr_learners_classif.xgboost.Rd | 3 ++- man/mlr_learners_regr.xgboost.Rd | 9 ++++++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/R/LearnerClassifXgboost.R b/R/LearnerClassifXgboost.R index b2a3610c..a4c9f555 100644 --- a/R/LearnerClassifXgboost.R +++ b/R/LearnerClassifXgboost.R @@ -35,8 +35,8 @@ #' In order to monitor the validation performance during the training, you can set the `$validate` field of the Learner. #' For information on how to configure the valdiation set, see the *Validation* section of [`mlr3::Learner`]. #' This validation data can also be used for early stopping, which can be enabled by setting the `early_stopping_rounds` parameter. -#' The final (or in the case of early stopping best) validation scores can be accessed via `$internal_valid_scores`. -#' +#' The final (or in the case of early stopping best) validation scores can be accessed via `$internal_valid_scores`, and the +#' optimal `nrounds` via `$internal_tuned_values`. #' @templateVar id classif.xgboost #' @template learner #' diff --git a/R/LearnerRegrXgboost.R b/R/LearnerRegrXgboost.R index 98b410a0..41e8b509 100644 --- a/R/LearnerRegrXgboost.R +++ b/R/LearnerRegrXgboost.R @@ -14,7 +14,7 @@ #' See the section *Early Stopping and Validation* on how to do this. #' #' @template note_xgboost -#' @inheritSection mlr_learners_classif.xgboost Early stopping +#' @inheritSection mlr_learners_classif.xgboost Early Stopping and Validation #' @inheritSection mlr_learners_classif.xgboost Initial parameter values #' #' @templateVar id regr.xgboost diff --git a/man/mlr_learners_classif.xgboost.Rd b/man/mlr_learners_classif.xgboost.Rd index 0bcae2b3..e69438dc 100644 --- a/man/mlr_learners_classif.xgboost.Rd +++ b/man/mlr_learners_classif.xgboost.Rd @@ -52,7 +52,8 @@ would error. Just setting a nonsense default to workaround this. In order to monitor the validation performance during the training, you can set the \verb{$validate} field of the Learner. For information on how to configure the valdiation set, see the \emph{Validation} section of \code{\link[mlr3:Learner]{mlr3::Learner}}. This validation data can also be used for early stopping, which can be enabled by setting the \code{early_stopping_rounds} parameter. -The final (or in the case of early stopping best) validation scores can be accessed via \verb{$internal_valid_scores}. +The final (or in the case of early stopping best) validation scores can be accessed via \verb{$internal_valid_scores}, and the +optimal \code{nrounds} via \verb{$internal_tuned_values}. } \section{Dictionary}{ diff --git a/man/mlr_learners_regr.xgboost.Rd b/man/mlr_learners_regr.xgboost.Rd index a3ea6d0a..ed093678 100644 --- a/man/mlr_learners_regr.xgboost.Rd +++ b/man/mlr_learners_regr.xgboost.Rd @@ -106,11 +106,14 @@ lrn("regr.xgboost") xgb_model \tab untyped \tab NULL \tab \tab - \cr } } -\section{Early stopping}{ -Early stopping can be used to find the optimal number of boosting rounds. -Set \code{early_stopping_rounds} to an integer vaulue to monitor the performance of the model on the validation set while training. +\section{Early Stopping and Validation}{ + +In order to monitor the validation performance during the training, you can set the \verb{$validate} field of the Learner. For information on how to configure the valdiation set, see the \emph{Validation} section of \code{\link[mlr3:Learner]{mlr3::Learner}}. +This validation data can also be used for early stopping, which can be enabled by setting the \code{early_stopping_rounds} parameter. +The final (or in the case of early stopping best) validation scores can be accessed via \verb{$internal_valid_scores}, and the +optimal \code{nrounds} via \verb{$internal_tuned_values}. } \section{Initial parameter values}{