【发布时间】:2012-06-16 01:01:07
【问题描述】:
我正在使用 R 包 caret 并且并行处理不起作用。如果我尝试从 train 函数运行示例:
library(mlbench)
data(BostonHousing)
library(doMC)
registerDoMC(2)
## NOTE: don't run models form RWeka when using
### multicore. The session will crash.
## The code for train() does not change:
set.seed(1)
usingMC <- train(medv ~ .,
data = BostonHousing,
"glmboost")
我收到以下错误:
Error in names(resamples) <- gsub("^\\.", "", names(resamples)) :
attempt to set an attribute on NULL
我使用的是 2011 年初型号的 MacBook Pro,配备 2.3GHz Intel Core i5 和 Mac OS X 10.6.8。
R 会话信息:
R 版本 2.13.0 (2011-04-13) 平台: x86_64-apple-darwin9.8.0/x86_64(64位)
附加的基础包:[1] stats graphics grDevices utils
数据集方法库其他附加包:[1] caret_5.13-20 cluster_1.14.2 reshape_0.8.4 plyr_1.7.1 lattice_0.19-33 mlbench_2.1-0
doMC_1.2.3 multicore_0.1-7 [9] foreach_1.3.2 codetools_0.2-8 iterators_1.0.5通过命名空间加载(未附加):[1] compiler_2.13.0 grid_2.13.0 rpart_3.1-51 tools_2.13.0
我能做些什么来解决这个问题吗?
【问题讨论】:
-
在将
train与method = "gbm"一起用于其他数据时,我随机收到相同的错误消息。我没有看到像svmLinear, svmPoly, svmRadial, svmRadialCost, rda这样的方法的错误。