Random forests or random decision forests are an ensemble learning method for classification, regression, and other tasks that operate by constructing a multitude of decision trees at training time and outputting the class that is the mode of the classes (classification) or mean prediction (regression) of the individual trees.

There are many Massive open online courses (MOOC) that will take directly the coding part in implementing the Random Forest Algorithm but no one will take you through the Math behind the algorithm.

Could anyone explain how does it select the node to split?

  • 2
    $\begingroup$ There is very little math. There are no proofs showing the "optimality" of random forest protocols in any specific setting. All the evidence in favor is based on specific data sets and simulation studies. More importantly, the whole paradigm pushed forward by Leo Breiman is encouraging you not to shy away from your own modifications (including random splits). For example, the optimal choice of the number of features per split (relative to the total number of features) is not clear. $\endgroup$
    – stans
    Dec 11, 2022 at 5:37

1 Answer 1


There are many implementations and they are different from each other.

The classic random forest is proposed by Leo Breiman, you can read his paper 'random forest' for more math details.

For R, you may check the document for rpart package:An Introduction to Recursive Partitioning Using the RPART Routines, which is used to build the trees in R randomForest package.

In chapter 3, it gives exactly how to make the split.

  • 1
    $\begingroup$ Could you at least summarize the papers instead of only giving the links? Links die, in such case your answer would be useless for anyone reading it. With a summary they would at least get something from it. $\endgroup$
    – Tim
    Jun 28, 2021 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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