我在使用R.和xgb.cv但是xgboost,它不工作并行如何使R包xgboost在OS X中与OpenMP编译并行?
我的示例代码如下
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也没有工作 感谢
像你得到一个错误,它不工作,或者不使用8个核的工作?你在Mac或Windows? – TBSRounder
我正在使用mac电脑 –