Understanding the decision tree
A decision tree can be explained as a tree-model decision tool that highlights the decisions and their related consequences. It throws light on the outcomes of events, costs of resources, and utility. It represents choices and consequences related to various decisions regarding a particular scenario. It can be understood as a flowchart model with nodes representing different outcomes and scenarios.
It depicts a sequential and hierarchal decision-making model. From a broader perspective, a decision tree is a tool that shows a wide range of outcomes based on the decisions taken by the user. A decision tree is also an important part of data science training and data science careers.
Applications and advantages of a decision tree
A decision tree is generally used to obtain all possible decision points and the associated outcomes. It is widely used in the finance and banking-related courses and segments for work related to the loan agreement, candidate assessment, data management, etc. It also helps to easily assess the productivity of any new product. Some of the most prominent advantages of a decision tree are listed below.
- One of the most prominent advantages of using a decision tree is that it can be easily understood by people even without having special statistical knowledge. The graphical representation of decisions and their consequences can help to easily understand the scenario.
- It helps to paint a clear picture between two or more related variables. It also plays an important role in highlighting the most significant variable when there are tons of variables to deal with. In addition to this, it also helps to analyze the impact of different variables.
- A decision tree is simple to understand and create and it doesn’t require additional efforts by the user to prepare and present the data without any limit on the type of data being used. It also provides an effective way to find meaningful relationships between the variables.
Creating the perfect decision tree
There are many variables associated with a given scenario that impacts the decision taken by an individual or entity and also have an influence over the final outcome. Let’s take a case where a bank has to sanction a loan to an individual.
Now to make a decision regarding granting a loan to this individual there is n number of factors that the bank has to consider some of which include monthly income, number of income sources, ability to repay the loan, credit history, collateral provided, etc.
Now all these will have to be put systematically in question form and every answer will have two or more consequences that will help to produce the tree. The basic structure of every decision tree includes a root node, an internal node, and a leaf node.
The root node denotes the starting point in the tree, it contains a question to be answered or a decision to be evaluated. The leaf nodes also contain similar questions to be answered and are connected by branches, which are simply arrows connecting different nodes. Each node has two or more nodes attached to it. A yes or no question will have two nodes “yes” and “no”. Here are a few tips to create a good decision tree.
- Start by creating a rectangular shape on the left side to represent the first node or root node that contains the main question for which an answer is needed.
- Now you need to add branches to represent different alternatives present and generally, it moves towards the right end of the page.
- Enter the leaf nodes, leaf nodes are connected to the root nodes with the help of a branch and each leaf note contains a new question that is relevant to the main idea.
- Add on more branches as per the needs of the decision-making process or idea validation, this has to be carried out until all relevant questions have been answered.
- Terminate the branch when all questions have been answered and a decision has been made.