Does random forest in R have a limitation of size of training data?

前端 未结 2 1678
忘掉有多难
忘掉有多难 2021-02-04 20:17

I am training randomforest on my training data which has 114954 rows and 135 columns (predictors). And I am getting the following error.

model <- randomForest         


        
2条回答
  •  死守一世寂寞
    2021-02-04 20:57

    One alternative you could try if you can't use a machine with more memory is: train separate models on subsets of the data (say 10 separate subsets) and then combine the output of each model in a sensible way (the easiest way to do this is averaging the predictions of the 10 models but there are other ways to ensemble models http://en.wikipedia.org/wiki/Ensemble_learning).

    Technically you would be using all your data without hitting the memory restriction, but depending on the size of the resulting subsets of the data the resulting models might be too weak to be of any use.

提交回复
热议问题