我在 R 中使用 xgb.cv 和 xgboost。但是,它不能并行工作
我的示例代码如下
library(xgboost)
library(parallel)
param <- list("objective" = "reg:logistic"
, "eval_metric" = "logloss"
,"nthread" = 8
,"bst:eta" = .025
,"bst:max_depth" = 3
,"lambda" = 1
,"lambda_bias" = 0
,"alpha" = .8
,"min_child_weight" = 3
,"subsample" = .9
,"colsample_bytree" = .6)
bst.cv3 = xgb.cv(param=param, data = x, label = y,
nfold = 3, nrounds=cv.nround, missing = NA
,prediction = TRUE)
但是,上面的代码不起作用。我必须做什么才能使它们平行?
我在 xgboost 网站和 github 上找到了这个
但是,我无法运行
brew install clang-omp
或者
brew install gcc --without-multilib
sudo 也不起作用谢谢