Skip to content
BENIBIX Learn

Decision Tree

AI📈 Machine LearningClassic ML Algorithms

Also known as Classification Tree, Regression Tree

A model that asks yes or no questions. Each answer leads to the next one, until it is done.

Think of it like

Think of it like a game of twenty questions. Each answer sends you down one path.

Example

Jack's tree for getting to work asks: Is it raining? If yes, take the bus. If no, is it colder than 5 degrees? If yes, bus. If no, bike.

Why it matters

It is one of the easiest models to explain. It is also the building block for random forests and gradient boosting.

Definition

A decision tree is a model that reaches an answer by asking a chain of yes or no questions. Each question splits the data into two smaller groups. Training picks the questions that split the data most cleanly. At the end of each path is an answer, like a group or a number. You can read the whole tree and see exactly why it decided.
Each box is a question, and each end of a branch is an answer. You can trace any decision by hand.

Common mistake

Letting the tree grow too deep. It then learns every quirk of the training data and does worse on new data.

Key takeaways

  1. 1
    Yes or no questions. One split at a time.
  2. 2
    Clean splits. Training picks the best questions.
  3. 3
    Easy to read. You can follow every path.

Learn it properly