[R] remove default values in internal booster manipulation functions (#9461)

This commit is contained in:
James Lamb
2023-08-11 02:07:18 -05:00
committed by GitHub
parent d638535581
commit 428f6cbbe2
5 changed files with 32 additions and 13 deletions

View File

@@ -363,8 +363,13 @@ xgb.train <- function(params = list(), data, nrounds, watchlist = list(),
is_update <- NVL(params[['process_type']], '.') == 'update'
# Construct a booster (either a new one or load from xgb_model)
handle <- xgb.Booster.handle(params, append(watchlist, dtrain), xgb_model)
bst <- xgb.handleToBooster(handle)
handle <- xgb.Booster.handle(
params = params,
cachelist = append(watchlist, dtrain),
modelfile = xgb_model,
handle = NULL
)
bst <- xgb.handleToBooster(handle = handle, raw = NULL)
# extract parameters that can affect the relationship b/w #trees and #iterations
num_class <- max(as.numeric(NVL(params[['num_class']], 1)), 1)