(Deprecated) Decision tree overview

In a decision tree, conditions are shown as nodes, values as branch lines, and actions in boxes at the ends of branches.

Decision trees provide a way to view and manage large sets of business rules in diagrams.

Decision trees make the interaction of nonsymmetrical rules easier to understand. The path from the first condition to the end of the actions along any branch represents one rule.

Image shows a decision tree that contains the path from the first condition to the end of the actions.

Looking at the following figure, you can see why decision trees are easy to understand:

  • A condition is declared in its diamond-shaped node  1 .

  • The possible values for the condition are represented by branches  2 .

  • The actions are declared at the end of each branch  3 .

This simple decision tree corresponds to the following rule:

Image shows a simple decision tree that contains a condition, a branch, and an action.
if
   the grade in the loan report is ‘A’
then
   in the loan report, accept the loan with the message “Loan accepted”

By adding branches, you add new rules that have different values for the condition.

For example, the following decision tree forms three rules for a loan application (A, B, and C®):

Image shows a decision tree that has three rules.

You can put as many actions as you want at the end of a branch, and add another condition to a branch.

For example, rules 1 and 2 in the following decision tree have only one condition (Grade), while rules 3 and 4 have a second condition to check (Spouse bankruptcy) before they do the actions:

Image shows a decision tree that contains two rules with one condition, and two rules with two conditions.

Finally, you can add an Otherwise branch for condition values that are not covered by any of the other branches:

Image shows a decision tree that contains an otherwise branch.

You can lay out your decision tree vertically or horizontally for optimal viewing, and set or remove consistency checking.

Preconditions

You can set the following elements in a precondition section of a decision tree:

  • Variables that can be used in the decision tree.
  • Condition that is applied to an entire decision tree.

If the precondition is not satisfied, none of the rules in the decision tree can be evaluated.

For example, you can apply the following precondition to a decision tree:

definitions
   set ‘wealthy customer’ to a customer
      where the average monthly balance of this customer 
                                      is more than $1,000,000
if
   the state of residence of ‘wealthy customer’ is NY

Applying this precondition to a decision tree limits the scope of the decision tree rules to only those customers who have an average monthly balance of $1,000,000 and live in New York. You can also use the variable wealthy customer in the tree.

Preconditions are tested before each rule in a tree is run.