From e235ab4beebf989b3810f00fe40fc235e8cf69a3 Mon Sep 17 00:00:00 2001 From: david-cortes Date: Fri, 3 Jan 2025 16:58:25 +0100 Subject: [PATCH] correct default values for learning rate --- R-package/R/xgb.train.R | 6 +++--- R-package/man/xgb.params.Rd | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/R-package/R/xgb.train.R b/R-package/R/xgb.train.R index 77aa5eb8ccae..49726382c9fb 100644 --- a/R-package/R/xgb.train.R +++ b/R-package/R/xgb.train.R @@ -459,10 +459,10 @@ xgb.train <- function(params = xgb.params(), data, nrounds, evals = list(), #' @param seed Random number seed. If not specified, will take a random seed through R's own RNG engine. #' @param booster (default= `"gbtree"`) #' Which booster to use. Can be `"gbtree"`, `"gblinear"` or `"dart"`; `"gbtree"` and `"dart"` use tree based models while `"gblinear"` uses linear functions. -#' @param eta,learning_rate (two aliases for the same parameter) (default=0.3) +#' @param eta,learning_rate (two aliases for the same parameter) #' Step size shrinkage used in update to prevent overfitting. After each boosting step, we can directly get the weights of new features, and `eta` shrinks the feature weights to make the boosting process more conservative. -#' -#' range: \eqn{[0,1]} +#' - range: \eqn{[0,1]} +#' - default value: 0.3 for tree-based boosters, 0.5 for linear booster. #' #' Note: should only pass one of `eta` or `learning_rate`. Both refer to the same parameter and there's thus no difference between one or the other. #' @param gamma,min_split_loss (two aliases for the same parameter) (for Tree Booster) (default=0, alias: `gamma`) diff --git a/R-package/man/xgb.params.Rd b/R-package/man/xgb.params.Rd index e5c74d85f837..f51e764e84db 100644 --- a/R-package/man/xgb.params.Rd +++ b/R-package/man/xgb.params.Rd @@ -121,10 +121,12 @@ contention and hyperthreading in mind.} \item{booster}{(default= \code{"gbtree"}) Which booster to use. Can be \code{"gbtree"}, \code{"gblinear"} or \code{"dart"}; \code{"gbtree"} and \code{"dart"} use tree based models while \code{"gblinear"} uses linear functions.} -\item{eta, learning_rate}{(two aliases for the same parameter) (default=0.3) +\item{eta, learning_rate}{(two aliases for the same parameter) Step size shrinkage used in update to prevent overfitting. After each boosting step, we can directly get the weights of new features, and \code{eta} shrinks the feature weights to make the boosting process more conservative. - -range: \eqn{[0,1]} +\itemize{ +\item range: \eqn{[0,1]} +\item default value: 0.3 for tree-based boosters, 0.5 for linear booster. +} Note: should only pass one of \code{eta} or \code{learning_rate}. Both refer to the same parameter and there's thus no difference between one or the other.}