What is a Decision Tree? Blog Image
March 17, 2021

What is a Decision Tree? How to do Decision Tree Analysis

Diagrams for Businesses
Diagrams for Software Engineering

Decision trees are frameworks that allow businesses or organizations to make consistent choices or classifications of data. Decision tree analysis could also be used to map possible outcomes and guide you toward the best choice. 

Decision trees are different from flowcharts because flowcharts are used to describe the tasks involved in a process, which could include multiple decisions along the way. Decision trees are for a single decision or classification. You might call those “What Movie Should You Watch on Netflix?” diagrams a flowchart, but they’re more like a non-technical decision tree because they guide you through a single decision.

Types of Decision Tree Diagrams

Classification Trees

A classification tree is a type of decision tree that puts objects or outcomes into clear categories or classes. You could apply a classification tree to sort crustaceans into their correct genus and species. This type of decision tree would help you distinguish between an Atlantic Lobster and a Canadian Lobster, for example.

Regression Trees

Unlike a classification tree, regression trees are used to predict a continuous value. For example, a regression tree would generate an expected price range for a car by weighing factors that impact the price of the car. This would be things like whether or not the car has had any major accidents, the brand on the car, and the year the car was made.

Why use Decision Trees? Decision Tree Examples, Templates, & Benefits

Decision Tree Example 1: Guiding You Through Repeated Decisions

These diagrams are most helpful when they describe a process or decision you’ll make multiple times, like what gift to give to a customer based on the data you’ve collected (money spent with your company, length of relationship, etc).

Example of a Decision Tree for Budgeting

Launch this decision tree example as a template >>

Decision Tree Example 2: Minimize Bias While Making Choices

Making a diagram can inform decisions where you want to minimize the risks of bias or discimination. A great example of this would be creating a decision tree that determines what interest rates are appropriate to quote when consumers apply for a loan. 

Decision tree example and template

Launch this example as a decision tree template >>

Decision Tree Example 3: Help Users Select from Many Choices

Have you ever struggled to find something to wear while standing in front of your closet or flipped through a hundred TV channels before giving up? This phenomenon is called overchoice: our brains actually get worse at making decisions when presented with too many options. Visual aids like decision trees can help users narrow down the options into a more manageable selection.

Fun decision tree example and template

Click to launch this tree diagram example as a template >>

How to Make Decision Trees

Follow along with this quick tutorial by starting a free trial of Gliffy Online.

Step 1: Start with Your Big Decision

Draw in a square or rectangle to represent the initial decision you’re making. This is called the root node. Give it a label that describes your challenge or problem. 

Step 1 for drawing a decision diagram

In this example, we’ll use a decision tree to structure and guide our budget for holiday gifting at a company.

 

Step 2: Add Possible Outcomes

Next, you’ll add circles to represent the outcomes that you’re considering. These are called leaf nodes and the circle indicates that there’s a chance of these outcomes happening. Your main decision should be to the left of the drawing, with outcomes branching out to the right. 

For our example, we might decide that the most important factor in what we’re giving customers is the length of our relationship with them. This means that the first set of potential outcomes is that a given customer is a long-term, medium-term, or new customer. The second-most important factor in our decision could be their account size, but let’s say we decide that’s unimportant for the newer customers. 

Step 2 for drawing decision trees

Step 3: Draw Triangles to Indicate Final Outcomes

To show your user that they’ve reached an end point in the decision tree, you’ll add a triangle. If you end up applying math or analysis to this tree, this triangle is where you’ll add any risks or values you calculated.

With the factors in our gift-giving decision determined, we’ll add triangles to indicate that there are five potential outcomes for each customer we consider.

Step 3 for drawing decision trees

 

Step 4: Draw in the Branches

Once you’ve laid out your decision and all the leaf nodes showing what could possibly happen, you’ll use the connector tool to draw lines between the decision and those nodes.

Step 4 for decision trees: use the connector tool

Step 5: Add Data or Descriptions to the Branches

In Gliffy, you can add labels and notes to lines simply by clicking on them and starting to type. Depending on the use case for your diagram, these notes could by your estimated probability of this outcome occurring, simple descriptions like “yes” or “no” to help guide users through the decision tree, or the costs associated with the outcome.

For our example, we’re going to add an estimate of what percentage of our customers fall into a given category. This will help us budget for the gifts appropriately in the future.

Step 5 for decision diagrams: add data

Step 6: Calculate or Estimate the Value of Each Final Outcome

Depending on the data you included in the branches of your decision tree, make sure to complete your tree by adding the final expected values, percentage, risk, or estimate at the end of each branch.

In our gifting example, this tells us that approximately 5% of our customers would be eligible for Gift 1. If we have 1000 customers in total and want to give a gift worth $300 to these high-value account holders, our budget for Gift 1 would need to be $15,000. (5% of 1000 customers = 50 qualifying customers, multiplied by $300 each.)

Step 6 for decision tree analysis: calculate and analyze data

Step 7: Make a Decision!

With each possible outcome mapped out, you should have a solid understanding of the pros and cons, the data you need to make an informed choice, or a trust-worthy framework you can use again and again. 

Based on our gift budgets and our customer breakdown in the decision tree above, you would need to ask for $52,000 to send gifts to your customers according to this plan. If you decide that budget is too high, you can easily see how a tweak in your plan would change the amount of money you need to spend. 

Maybe you could send your longtime, small-account customers a $50 gift? That would save $7500. Or, you could say that a “trusted customer” with an account value greater than $100k would get Gift 3, which would shift the breakdown between gift 3 and 4 significantly and could also save several thousand dollars on your plan.

Using a Decision Tree in Machine Learning

In machine learning, a decision tree flowchart can help you understand what rules are being applied to a classification task or regression task. If you are trying to write an algorithm that completes these tasks, starting with a basic decision tree can be a good way to organize your thoughts.

Consider using a machine learning decision tree to create a rough draft of your algorithm or describe the outcomes of your regression analysis. This will make your technical work easier for non-technical stakeholders to interpret or understand.

Start with Decision Tree Analysis in Gliffy

Ready to make your own decision tree flowchart? Gliffy makes it easy, with drag-and-droppable shapes and the ability to easily add descriptions to the branches in your diagram. Get started with a free trial and you’ll be conducting decision tree analysis like a pro in no time.

Try Gliffy FreeConfluence & Jira Apps