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 = nt) :
Reached total allocation of 3958Mb: see help(memory.size)
5: In matrix(double(nrnodes * nt), ncol = nt) :
Reached total allocation of 3958Mb: see help(memory.size)
このエラーを回避するにはどうすればよいですか? より少ないデータでトレーニングする必要がありますか? しかし、それはもちろん良いことではありません。誰かが、トレーニング データからより少ないデータを取得する必要がない代替案を提案できますか? 完全なトレーニング データを使用したい。