A decision tree is a pictorial description of a well-defined decision problem. A decision tree describes graphically the decisions to be made, the events that may occur, and the outcomes associated with combinations of decisions and events.
If probabilities are assigned to the events, and values are determined for each outcome by calculating the expected value of each available alternative. Decision trees are useful because they provide a clear, documentable and discussible model of either how the decision was made or how it will be made. A major goal of the analysis is to determine the best decisions.
Decision trees are commonly used in operations research, specifically in decision analysis, to help identify a strategy most likely to reach a goal, but are also a popular tool in machine learning.
How to Construct and Decision Tree with Case Study
We can start from the root node which contains an attribute of Travel cost per km.
- If the travel cost per km is expensive, the person uses a car.
- If the travel cost per km is the standard price, the person uses a train.
- If the travel cost is cheap, the decision tree needs to ask the next question about the gender of the person. If the person is a male, then he uses a bus.
- If the gender is female, the decision tree needs to ask again how many cars she owns in her household.
- If she has no car, she uses a bus,
- Otherwise, she uses the train.
Decision Tree Example: Vehicle Purchase Decision Tree
This is a decision tree example created with the Decision Tree tool. It shows what and how a purchase decision is made. Let’s take a path as an example – If the color of the vehicle is red and was launched after 2010, buy it.
Decision Tree Example – Entertainment Decision
Imagine you only ever do four things at the weekend:
- go shopping,
- watch a movie,
- play tennis or
- just stay in.
What you do depends on three things:
- the weather (windy, rainy or sunny);
- how much money you have (rich or poor) and
- whether your parents are visiting.
The decision for Tree Classification
- Rule 1: if my parents are visiting, we’ll go to the cinema.
- Rule 2: If they’re not visiting and it’s sunny, then I’ll play tennis, but
- Rule 3: if it’s windy, and I’m rich, then I’ll go shopping.
- Rule 3: If they’re not visiting, it’s windy and I’m poor, then I will go to the cinema.
- Rule 4: If they’re not visiting and it’s rainy, then I’ll stay in.
Now, you draw a flowchart which will enable you to read off your decision in the form of decision trees for the weekend decision choices would be as follows: