我在使用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電腦 –