我正在对一个包含8个数字列(预测变量)和1个类别列(结果变量)的数据集运行随机森林算法。该数据集中有120万行数据。当我执行以下代码时:randomForest(outcome.f ~ a + b + c + d + e + f + g + h,data=mdata))
,出现了错误:
"Error in randomForest.default(m, y, ...) :
long vectors (argument 26) are not supported in .Fortran"
有没有什么方法可以防止这种情况发生?我不明白为什么该程序包(显然)试图分配一个长度为2^31-1的向量。我正在使用Mac OS X 10.9.2,并且使用Intel Core i7(如果架构很重要的话)。
会话信息
R version 3.1.0 (2014-04-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] randomForest_4.6-7
loaded via a namespace (and not attached):
[1] tools_3.1.0