What Is a Random Forest? A Plain-Language Explanation

Updated · By Viviai

A random forest is an ensemble machine learning algorithm that builds many decision trees on different data samples and combines their votes to produce a single classification or regression result, usually reducing the overfitting and instability of one tree.

The simple analogy

One advisor may have personal biases, but a panel of advisors who each look at slightly different information tends to give a more balanced answer. A random forest is that panel, where every member is a decision tree.

Why a single tree is not enough

A single deep decision tree can memorize noise and change sharply when data changes. Combining many trees averages out these variations.

How it works

Step Description
Bootstrap sampling Draw random samples with replacement
Random feature selection Each split considers only a subset of features
Grow trees Build many independent decision trees
Combine votes Majority vote for classification, average for regression

The two sources of randomness

  1. Data randomness: each tree sees a different bootstrap sample.
  2. Feature randomness: each split considers a limited set of features.

Strengths

Honest caveats

A forest is less easy to interpret than a single tree and can be slower and larger with many trees. It is a robust general-purpose model, not a guarantee of correct predictions.

FAQ

Is a random forest supervised or unsupervised?

It is supervised, built from labeled training data.

It is a collection of many decision trees whose outputs are combined.

What is bagging?

Training models on bootstrap samples and averaging their results, which reduces variance.

Why randomize features?

So trees do not all rely on the same strong predictor, making them more diverse.

Key takeaways

Continue with what is a decision tree and what is overfitting.

Sources

  1. https://www.ibm.com/think/topics/random-forest
  2. https://www.cs.cornell.edu/courses/cs4780/2018fa/lectures/lecturenote18.html
  3. http://www.shturl.cc/dfa255f6cd1c97831c41fae6ccccf2c9

Learn by doing

Read a guide, then practice with bite-sized AI lessons you can take offline.

Start learning free