小编Ayu*_*ngh的帖子

R中的随机森林是否有训练数据大小的限制?

我在训练数据上训练随机森林,训练数据有114954行和135列(预测因子).我收到以下错误.

model <- randomForest(u_b_stars~. ,data=traindata,importance=TRUE,do.trace=100, keep.forest=TRUE, mtry=30)

Error: cannot allocate vector of size 877.0 Mb
In addition: Warning messages:
1: In randomForest.default(m, y, ...) :
The response has five or fewer unique values.  Are you sure you want to do regression?
2: In matrix(double(nrnodes * nt), ncol = nt) :
Reached total allocation of 3958Mb: see help(memory.size)
3: In matrix(double(nrnodes * nt), ncol = nt) :
Reached total allocation of 3958Mb: see help(memory.size)
4: In matrix(double(nrnodes * nt), ncol = …
Run Code Online (Sandbox Code Playgroud)

r machine-learning random-forest

5
推荐指数
2
解决办法
8615
查看次数

标签 统计

machine-learning ×1

r ×1

random-forest ×1