Flow, process and networks

Decision tree

Shows decision rules or fitted model splits leading to outcomes or predictions.

  • Diagram
  • Decision logic
  • Prediction

What it answers

Which rules lead to each outcome?

Shape
Rule branches ending in outcomes
What it shows
Decision paths and segmentation.

Example

The question

Which customers are likely to cancel, by simple rules?

Rules for spotting customers likely to cancel (decision tree)

Rules for spotting customers likely to cancel (decision tree)Questions branch into yes and no until an outcome. No app use last month: likely to cancel (62% of 400). App users with 3 or fewer tickets: stay (6% cancel). App users with more tickets on Basic: likely to cancel (41%); on other plans: stay (12%).YesNoNoYesYesNoUsed app last month?Support tickets > 3?Likely to cancel62% of 400Stays6% cancelPlan = Basic?Likely to cancel41% of 150Stays12% cancel
Rules for spotting customers likely to cancel (decision tree)Questions branch into yes and no until an outcome. No app use last month: likely to cancel (62% of 400). App users with 3 or fewer tickets: stay (6% cancel). App users with more tickets on Basic: likely to cancel (41%); on other plans: stay (12%).YesNoNoYesYesNoUsed app last month?Support tickets > 3?Likely to cancel62% of 400Stays6% cancelPlan = Basic?Likely to cancel41% of 150Stays12% cancel
Questions branch into yes and no until an outcome. No app use last month: likely to cancel (62% of 400). App users with 3 or fewer tickets: stay (6% cancel). App users with more tickets on Basic: likely to cancel (41%); on other plans: stay (12%).

Illustrative data. It belongs to no company.

When to use it

Use it when

Explaining authored decisions or an interpretable fitted tree.

Avoid it when

When a tree implies causal rules or omits validation.

How to read it

Follow branch conditions from root to a terminal node.

Note

Distinguish expert-authored rules from fitted models.

The data you need

Layout
Rule-node table
Fields
NodeID: text; ParentID: text/blank; RuleOrOutcome: text; NodeType: category
One row is
One decision or outcome node. What is the grain?
Rules
Label branches with mutually understood conditions. Ensure parent-child connections and terminal outcomes are valid.
Optional
BranchLabel,Probability,Prediction. Fitted models need suitable training data and a training step.
Preparation
Validate unique node IDs, parent links, roots and absence of cycles. For size-encoded hierarchies, state whether totals are leaf-only or inclusive.
Units
Tree levels and branch position are structural. Size-encoded components use a named value unit; parent shares divide by the chosen parent total.
Example of the input layout: Rule-node tableA long table: one row per observation, few columns. New data adds rows.NodeIDParentIDRuleOrOutcoNodeTypeAABBC
A long table: one row per observation, few columns. New data adds rows.

Worked example

Rule income>50000 leadsApprove; otherwiseReview. Income 60000 followsApprove. This is an authored rule, not evidence of model accuracy.

NodeIDParentIDRuleOrOutcomeNodeType
n1Income > 50000Decision
n2n1ApproveOutcome
n3n1ReviewOutcome