Saraswati Stitch needle-and-thread markSaraswati Stitch®
contact@saraswatistitch.comBook a call
← Glossary

Definition

Random forest

A random forest is a machine learning model that trains many decision trees on random slices of the data and combines their votes, which makes it far more accurate and stable than a single tree.

Each tree in the forest sees a random sample of the rows and, at each split, a random subset of the columns. Individually the trees are rough, but their mistakes differ, so averaging their answers cancels much of the error. That fixes the main weakness of a single decision tree, which tends to memorise its training data.

The method was properly introduced by Leo Breiman in a 2001 paper, building on earlier work by Tin Kam Ho, as the history of random forests records. Businesses use it for churn prediction, credit risk, fraud detection and demand forecasting on structured data in rows and columns.

Is random forest outdated? No. Gradient-boosted trees such as XGBoost often score slightly higher, but random forests are quick to train, hard to break and need little tuning, so they remain a strong first model. Is it AI or ML? It is machine learning, which is a branch of AI.

Related terms

  • Machine learning: Machine learning is a branch of AI where a system learns patterns from data and improves at a task through examples, instead of being programmed with explicit rules.
  • Supervised learning: Supervised learning is a machine learning method where a model learns from labelled examples, pairs of inputs and correct answers, so it can predict the answer for new inputs it has not seen before.
  • Overfitting: Overfitting is when a machine learning model learns its training data too closely, including its noise and quirks, so it performs well on the examples it has seen but poorly on new data.
  • Feature engineering: Feature engineering is the work of turning raw data into the inputs a machine learning model learns from, such as converting order dates into days since last purchase or totals into averages per month.