What Is a Random Forest? A Plain-Language Explanation
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
- Data randomness: each tree sees a different bootstrap sample.
- Feature randomness: each split considers a limited set of features.
Strengths
- Handles classification and regression.
- Often less prone to overfitting than one deep tree.
- Provides estimates of feature importance.
- Works with relatively little tuning.
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.
How is it related to decision trees?
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
- A random forest combines many decision trees into one prediction.
- Bootstrap samples and random features create diversity.
- Ensemble voting often reduces overfitting.
- Interpretability and speed are trade-offs to consider.
Continue with what is a decision tree and what is overfitting.
Sources
Learn by doing
Read a guide, then practice with bite-sized AI lessons you can take offline.
Start learning free