← All nodes
Analytics

Decision Tree

Grows a CART decision tree that predicts a class (Gini) or a number (variance) from other columns, and writes the prediction and the readable rule behind it.

When to use it

Use it when you need to explain a prediction — interpretable segments such as “Plan = Basic and Tenure <= 17 → churns”.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
Predict (column)selectYesSelect column…
From columns (features)selectYesPick the columns that explain it
Kind of predictionselect—auto
Max depthnumber—4
Smallest group (rows)number—5
Prediction column nametext—Default: Prediction
Add the rule behind each predictioncheckbox—true
Add a Model column (JSON for Score Model)checkbox—false

Example

Who churns

  • Predict (column)=Churned
  • From columns (features)=Plan, Tenure
  • Max depth=2
  • Smallest group (rows)=1
Customers
PlanTenureChurned
Basic2yes
Basic30no
Pro3no
Basic4yes
Pro40no
Prediction and rule
PlanTenureChurnedPredictionRule
Basic2yesyesPlan = Basic and Tenure <= 17
Basic30nonoPlan = Basic and Tenure > 17
Pro3nonoPlan ≠ Basic
Basic4yesyesPlan = Basic and Tenure <= 17
Pro40nonoPlan ≠ Basic

Worth knowing

  • Decide from the data predicts a number when the column holds more than 10 different numbers, and a class otherwise.
  • Numeric columns split at a threshold; text columns split one value against the rest. Rows missing a value follow the larger branch.
  • Max depth (default 4) and Smallest group (default 5) keep the tree readable and stop it memorising the data.
  • Tick Add a Model column to hand the tree to Score Model; trees are not stored anywhere else.

Others in Analytics