Nodes and Branches
A Decision Tree is made up of different parts called nodes and branches. Understanding these parts makes it much easier to understand how a Decision Tree works.
Nodes ask questions. Branches connect the decisions.
A tree starts at a root node, moves through branches and decision nodes, and eventually reaches a leaf node containing the final prediction.
The Four Main Parts
A simple Decision Tree can be understood using four important terms.
The starting point of the tree.
A question that divides the data.
The path taken after a decision.
The final prediction or result.
What Is the Root Node?
The root node is the first point in a Decision Tree.
It contains the first decision that the model uses to split the data.
Every prediction starts from this point.
What Is a Decision Node?
A decision node is a point where the tree asks a question and splits the data.
For example:
The answer creates different paths.
The root node is also a decision node when it contains the first question. The term root describes its position at the top of the tree.
What Is a Branch?
A branch is the path connecting one decision to the next part of the tree.
For a simple Yes/No question, there are usually two possible branches.
The branch tells the model which direction to follow based on the input value.
What Is a Leaf Node?
A leaf node is the endpoint of a path in the Decision Tree.
It contains the final prediction.
Once the model reaches a leaf node, it stops following that path and returns the prediction.
See All the Parts Together
Let's put the four concepts into one simple tree.
Follow One Complete Path
Suppose a student has:
Now follow the tree step by step.
Study Hours > 3?
5 > 3, so follow Yes.
Attendance > 80%?
90 > 80 → Pass.
Another Example
Consider a simple model that predicts whether someone should play outside.
Notice how the first question is the root node. The paths leaving it are branches. The second question is another decision node, and the final answers are leaf nodes.
The Difference Between a Node and a Branch
These two terms are easy to mix up, so keep the distinction simple.
Usually contains a question or a final prediction.
Determines which direction the input follows.
Why These Parts Matter
When you understand these four terms, a Decision Tree diagram becomes much easier to read.
A Decision Tree is a collection of nodes connected by branches.
The tree starts at the root, makes decisions through nodes, follows branches, and ends at a leaf containing the final prediction.