Question

How do we find maximum depth of Random Forest if we know the number of features ?

This is needed for regularizing random forest classifier.

Was it helpful?

Solution

The maximum depth of a forest is a parameter which you set yourself. If you're asking how do you find the optimal depth of a tree given a set of features then this is through cross-validation. For example, create 5 rf's with 5 different tree depths and see which one performs the best on the validation set.

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top