Decision Tree
Decision Tree
A decision tree is a cause-and-effect flowchart meant to guide decision-makers. To build an effective one, you must anticipate all possible situations, options, and outcomes.
Each node represents a decision point or a test on a feature, each branch represents a YES/ NO outcome, and each leaf node represents a class label (or the potential outcome/result).
Steps to draw
Use a flowchart tool that supports decision tree flowcharts.
Identify / Choose the root node.
The root node represents the feature that best splits the data based on a criterion. Use a top-down approach, with the root node at the top and branches moving downward.
Ask yes or no questions in the decision nodes.
Divide the data into subsets based on the values of the chosen feature.
Create Branches for Each Outcome
Each branch represents a possible outcome or value of the chosen feature.
Repeat for Each Branch
For each subset of data, choose the next feature/question that best splits the data.
Add a new node and continue until you reach a stopping condition.
Label the Leaf Nodes
Leaf nodes represent the final decision or classification result.
Label each leaf node with the class label or the potential outcome.
Example
Note that circles 1, 2, 3 , are the steps to show you how to draw the decision trees. They are not part of the tree diagram.
Decision Trees are mainly used for decision-making and predictive analysis, primarily in machine learning and data science.