Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change xgboost default nrounds from 1 to 1000 #307

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions R/LearnerClassifXgboost.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#' @section Initial parameter values:
#' - `nrounds`:
#' - Actual default: no default.
#' - Adjusted default: 1.
#' - Reason for change: Without a default construction of the learner
#' would error. Just setting a nonsense default to workaround this.
#' `nrounds` needs to be tuned by the user.
#' - Adjusted default: 1000.
#' - Reason for change: Without a default construction of the learner would error.
#' The lightgbm learner has a default of 1000, so we use the same here.
#' - `nthread`:
#' - Actual value: Undefined, triggering auto-detection of the number of CPUs.
#' - Adjusted value: 1.
Expand Down Expand Up @@ -156,7 +155,7 @@ LearnerClassifXgboost = R6Class("LearnerClassifXgboost",
)

# custom defaults
ps$values = list(nrounds = 1L, nthread = 1L, verbose = 0L)
ps$values = list(nrounds = 1000L, nthread = 1L, verbose = 0L)

super$initialize(
id = "classif.xgboost",
Expand Down
2 changes: 1 addition & 1 deletion R/LearnerRegrXgboost.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ LearnerRegrXgboost = R6Class("LearnerRegrXgboost",
# param deps

# custom defaults
ps$values = list(nrounds = 1L, nthread = 1L, verbose = 0L)
ps$values = list(nrounds = 1000L, nthread = 1L, verbose = 0L)

super$initialize(
id = "regr.xgboost",
Expand Down