0% found this document useful (0 votes)
35 views5 pages

Decision Tree and Decision Table

The document discusses the importance of data organization in decision-making, focusing on decision trees and decision tables as knowledge representation techniques. It explains how these tools help in constructing rules for decision-making, highlighting their advantages and providing examples of their application. Additionally, it covers the conversion of decision tables into decision trees and the benefits of using decision trees over decision tables.

Uploaded by

coupscakebaby
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views5 pages

Decision Tree and Decision Table

The document discusses the importance of data organization in decision-making, focusing on decision trees and decision tables as knowledge representation techniques. It explains how these tools help in constructing rules for decision-making, highlighting their advantages and providing examples of their application. Additionally, it covers the conversion of decision tables into decision trees and the benefits of using decision trees over decision tables.

Uploaded by

coupscakebaby
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Decision Tree and Decision Table

Introduction

Data is one of the foremost resources of an organization. Every organization wishes to


preserve and fully utilize its data for decision-making. Once data is acquired, it must be
organized in an application's database for later use.
A database is a collection of facts, rules, and meta-data. There are different ways to
organize a database. A variety of knowledge representation techniques, such as semantic
nets, frames scripts, lists, decision trees, decision tables, etc., have been proposed for use
over the years. One data representation scheme may be more efficient than others
depending on the nature and type of problem. Thus, there is a need to map data from one
representation to another.
This mapping may give a faster response and reduce computation amount. Data in the
form of rules is easy to understand and fast to extract and implement. Rules can be
constructed from the data in a decision tree and decision table.
The blog's primary focus is to construct rules from the data presented in the form of a
decision tree and decision table. A human user can understand and modify a set of rules
much more easily than he or she can understand and modify a decision tree or decision
table.
During Structured Analysis, various techniques and tools are used for system
development. These are:
 Data Dictionary
 Data Flow Diagrams
 Decision Tables
 Structured English
 Decision Trees
 Pseudocode
Decision Tree
A Decision Tree is a graph that uses a branching method to display all the possible
outcomes of any decision. It helps in processing logic involved in decision-making, and
corresponding actions are taken. It is a diagram that shows conditions and their
alternative actions within a horizontal tree framework. It helps the analyst consider the
sequence of decisions and identifies the accurate decision that must be made.
Links are used for decisions, while Nodes represent goals. Decision trees simplify the
knowledge acquisition process and are more natural than frames and rule knowledge
representation techniques.
Let’s understand this with an example:
Conditions included the sale amount (under $50) and whether the customer paid by
cheque or credit card. The four steps possible were to:
 Complete the sale after verifying the signature.
 Complete the sale with no signature needed.
 Communicate electronically with the bank for credit card authorization.
 Call the supervisor for approval.

The below figure illustrates how this example can be drawn as a decision tree. In
drawing the tree.
Advantages of decision trees
 Decision trees represent the logic of If-Else in a pictorial form.
 Decision trees help the analyst to identify the actual decision to be made.
 Decision trees are useful for expressing the logic when the value is variable
or action depending on a nested decision.
 It is used to verify the problems that involve a limited number of actions.

Also see, V Model in Software Engineering


Decision Tables
Data is stored in the tabular form inside decision tables using rows and columns. A
decision table contains condition entries, condition stubs, action entries, and action
stubs. The upper left quadrant contains conditions. The upper right quadrant contains
condition alternatives or rules. The lower right quadrant contains action rules, and the
lower-left quadrant contains actions to be taken. Verification and validation of the
decision table are much easy to check, such as Inconsistencies, Contradictions,
Incompleteness, and Redundancy.
Example of Decision Table
Let's consider the decision table given in table 1.
In the table, there are multiple rules for a single Decision. The rules from a decision
table can be made by just putting AND between conditions.
The major rules which can be extracted (taken out) from the table are:
 R1 = If (working-day = Y) ^ (holiday = N) ^ (Rainy-day = Y) Then, Go to
office.
 R2 = If (working-day = N) ^ (holiday = N) ^ (Rainy-day = N) Then, Go to
office.
 R3 = If (working-day = N) ^ (holiday = Y) ^ (Rainy-day = Y) Then, Watch TV.
 R4 = If (working-day = N) ^ (holiday = Y) ^ (Rainy-day = N) Then, Go to
picnic.
 R1 = If (working-day = Y) ^ (holiday = N) ^ (Rainy-day = Y) Then, Go to
office.
 R2 = If (working-day = N) ^ (holiday = N) ^ (Rainy-day = N) Then, Go to
office.
 R3 = If (working-day = N) ^ (holiday = Y) ^ (Rainy-day = Y) Then, Watch TV.
 R4 = If (working-day = N) ^ (holiday = Y) ^ (Rainy-day = N) Then, Go to
picnic.

The above rules can be optimized by:


Optimized R1= If (working-day = Y) then Go to office
Or
Optimized R1= If (holiday = N) then Go to office
Optimized R3= If (working-day = N) ^ (Rainy-day = Y) Then Watch TV
Or
Optimized R3= If (holiday = Y) ^ (Rainy-day = Y) Then Watch TV
Optimized R4= If (working-day = N) ^ (Rainy-day = N)
Then go to the picnic.
Or
Optimized R4= If (holiday = Y) ^ (Rainy-day = N)
Then go to the picnic.
The tree given below is the resultant tree of Table 1.
The following rules are constructed from the decision tree as shown below.
R1= If (Day = Working) ^ (Outlook = Rainy)
Then Go To Office

R2= If (Day = Working) ^ (Outlook = Sunny)


Then Go To Office

R3= If (Day = Holiday) ^ (Outlook = Rainy)


Then Watch TV

R4=If (Day = Holiday) ^ (Outlook = Sunny)


Then Go To Picnic
In R1 and R2, there is no need to check the condition Outlook = Rainy and Outlook =
Sunny if day = working because if the day is working, whether it is a sunny or rainy day,
the decision is to Go to the office. The following rules are the optimized version of R1
and R2 above rules.
R1 optimized: If (Day = Working) Then Go To Office
R2 optimized: If (Day = Working) Then Go To Office
The refinement/optimization step result is effective, efficient, and accurate rules.
Conversion of decision table into decision tree
Data can be transformed from a decision table into a tree structure. The decision table
can be converted into a decision tree by using the conversion method discussed or some
other technique. The resultant tree has two categories: balanced trees and unbalanced
trees. The figure shows the input and output of the conversion process.
Advantages of a Decision tree over Decision table
 The decision tree takes advantage of the sequential structure of decision
tree branches to notice the order of checking conditions and executing
actions immediately.
 Decision tree is used to verify the problems that involve a limited number of
actions.
 All those actions and conditions that are critical are connected directly to
other conditions and actions, whereas the conditions that do not matter are
absent. In other words, the trees do not have to be symmetrical.
 Decision tree is helpful to express the logic when the value is variable, or
action is dependent on the nested decision.

You might also like