Learn AI · Level 2 · How AI works · step 6 of 18 · word 1 of 2
What is a decision tree in machine learning?
A decision tree is a model that makes a prediction by asking a series of yes-or-no questions about the data, like a flowchart. A random forest combines many trees and lets them vote.
In plain English
A decision tree learns a flowchart from examples. To judge a loan, it might ask: is income above a certain level? Has the person missed payments before? Each answer leads to the next question, until it reaches a prediction. You can read every step, which makes trees easy to explain.
An example
One tree tends to memorise its training data. In 2001, statistician Leo Breiman described random forests: hundreds of trees, each trained on a random slice of the data and features, that vote on the answer. The crowd is far more reliable than any single tree.
Watch out
Trees and forests work best on data in tables, such as customer records or sales figures, and are still a first choice there. For images, sound and text, neural networks do much better. See also gradient boosting.