Software Engineering – Decision Table & Tree

Decision Table

When the solution to a problem involves substantial logical decisions, the various conditions and possible actions involved can be represented in the form of a Table. This table is known as Decision Table. The decision table is divided into two parts:

  1. Condition
  2. Action

Condition:

The condition part specifies all conditions that are applied to the inputted data. It is also divided into two parts:- 

  1. Condition Stub It describes the conditions that exist in the program logic.
  2. Condition Entry It provides answers to questions asked in the condition asked in the condition term.

Action:

The action part is subdivided into two parts:-

  1. Action Stub It describes the action to be taken to meet each condition.
  2. Action Entry It describes the appropriate action resulting from the answer to the condition in condition entry.

Format:

Table HeadingDecision Rule
Condition StubCondition Entry
Action StubAction Entry
  Header(H)Rule (R) Identifiers
Condition Statements or condition(CS) Condition Entry Stub(CE)
Action Statements or Action Stub(AS) Action Entry (AE)
Notes : (NB) 

Advantages of Decision Table:-

  • Managers can be relieved from decision-making for routine matters where decision rules can be clearly structured.
  • Complex decision rules may be structured and even the classifications for the basis of the decisions will be very clear.
  • Also, there will be consistency in decision-making. The typical example is that of Life
  • Another use of DT is to make the communication between the manager and the system analyst or programmer easier.
  • The manager can represent his decision process through DT to the system analyst in a form that can be readily converted to flow diagrams for Computer programming.
  • Also, DT is a method of documentation that is easily prepared, changed, and updated.
  • Since DT is in summary form and standardized format, it is easier to use.

Disadvantages of Decision Table:-

  • The use of both flowchart and DT may impose an additional burden.
  • DT does not depict the flow by the logic of a solution to a given problem.
  • When there are too many alternatives, DT cannot list them all.
  • It is not easy to translate it into the source.

Decision Tree

Decision tree is a graphical representation of a decision table.

Purpose of it is to construct decision table.

A decision tree is a diagram that represents conditions and actions sequentially and thus shows which conditions to consider first, which to second and so on.

It is also a method of showing the relationship of each condition and its permissible actions.

A decision tree helps to show the paths that are possible in a decision following action or condition by the user.

In the decision tree, the mapping should show branch points and forks, but not the details of the user dialogue.

It helps the designer to visualize how the user will move through the design to reach at desired location.

The decision tree provides an overview of the flow of control to be built into the computer programs.

image 23
image 24

Advantages:

  1. Compared to other algorithms decision trees requires less effort for data preparation during preprocessing.
  2. A decision tree does not require normalization of data.
  3. A decision tree does not require scaling of data as well.
  4. Missing values in the data also do NOT affect the process of building a decision tree to any considerable extent.
  5. A Decision tree model is very intuitive and easy to explain to technical teams as well as stakeholders.

Disadvantage:

  1. A small change in the data can cause a large change in the structure of the decision tree causing instability.
  2. For a Decision tree sometimes calculation can go far more complex compared to other algorithms.
  3. Decision tree often involves higher time to train the model.
  4. Decision tree training is relatively expensive as the complexity and time has taken are more.
  5. The Decision Tree algorithm is inadequate for applying regression and predicting continuous values.

Leave a Comment