LearnMachine learning

Random forest

Grow many slightly different decision trees and let them vote. The crowd is wiser than any single tree.

  • Machine learning
  • Supervised
  • Ensemble

Filled dots train the forest; hollow dots test it. The shading shows how strongly the trees agree.

How it works

Many trees, one vote.

A random forest trains many decision trees, each on a random sample of the data drawn with replacement and each choosing from a random feature at every split. Every tree makes different mistakes.

To classify a point, all the trees vote. Their individual errors largely cancel out, so the forest is smoother, more stable and usually more accurate on new data than any single deep tree.

Forests work well with little tuning, which makes them a reliable first choice for tables of data. The price is that a forest is harder to explain than one small tree.