0
XGBoost
的并行执行
我想给它的参数,以优化XGBoost执行做nthread = 16,在我的系统有24个核心。但是当我训练我的模型时,在模型训练的任何时候,它似乎甚至不会跨越CPU使用率的20%左右。 代码片段如下: -
param_30 <- list("objective" = "reg:linear", # linear
"subsample"= subsample_30,
"colsample_bytree" = colsample_bytree_30,
"max_depth" = max_depth_30, # maximum depth of tree
"min_child_weight" = min_child_weight_30,
"max_delta_step" = max_delta_step_30,
"eta" = eta_30, # step size shrinkage
"gamma" = gamma_30, # minimum loss reduction
"nthread" = nthreads_30, # number of threads to be used
"scale_pos_weight" = 1.0
)
model <- xgboost(data = training.matrix[,-5],
label = training.matrix[,5],
verbose = 1, nrounds=nrounds_30, params = param_30,
maximize = FALSE, early_stopping_rounds = searchGrid$early_stopping_rounds_30[x])
请我如何能提高CPU利用率和加快执行效率模型训练给我解释一下(如果可能的话)。 R中的代码有助于进一步理解。
假设: - 这是关于XGBoost
欢迎SO - 请您提供一个[重复的例子(http://stackoverflow.com/questions/5963269/how-to -make-A-大-R再现的-示例) – C8H10N4O2