Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Random forest is a machine learning ensemble method based on choosing random subsets of observations and variables for each of many decision trees.


Random forests are an ensemble learning method for classification or regression that operate by constructing a multitude of decision trees at training time and aggregating their outputs: in regression by averaging, in classification either by averaging probabilities or by majority vote. The randomness in the decision trees follows from (a) using a new bootstrapped version of the original sample for each tree and (b) using a random subsample of the explanatory variables at each node of each tree.