Closed Naeemkh closed 3 years ago
You can create your own XGBoost wrapper function with a different value for the number of threads, this could either be the entire SL.xgboost()
code copied and given a new name after the edit, or you can create a new function that calls the SL.xgboost()
function with a different value for the parameter, for example:
SL.xgboost_thread4 <- function(nthread = 4, ...) SL.xgboost(nthread = nthread, ...)
The ...
makes sure all other arguments are passed.
Thanks @ecpolley, it resolves the problem.
On the following page, the number of threads for XGBoost is set to 1. Is there a way for the user to change that value. Or how can a user pass extra parameters to SuperLearner function? (something like ...)
https://github.com/ecpolley/SuperLearner/blob/master/R/SL.xgboost.R