I am building a randoForest model on some data. To be able to tune the model faster, I was working with 10% sample. I have tuned it now and now I want to build the model on the whole (100% data).

I am wondering, if I will have to increase the number of trees now that I am building the model on more training data points? Please let me know.


The best way to look at this problem is to consider the extreme case: let's say you duplicate every row in your dataset.

If you train a decision tree directly, there are certain hyperparameters you will want to change. For instance, in sklearn, you will want to double hyperparameters like min_samples_split or min_samples_leaf because in each node you'll have double the observations.

With regards to a random forest, usually, a random forest is learn by bootstrapping with resampling=True in the entire dataset. By doubling every observation, you make each observation just as likely to be picked. Even if you use a random forest which subsamples, doubling the dataset makes no difference.

Now, you are not doubling your data. You are introducing new data which might change the distribution of your data. To the extent that it does, then it will mean that whatever hyperparameters you have previously used might no longer be optimal. So you should just try. But, to answer your question, no.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.