Decision Tree
Watch candidate thresholds compete, then follow a sample from root to leaf.
A Decision Tree recursively selects feature thresholds that reduce impurity. ModelOrigen exposes candidate splits, the selected gain, growing nodes, the final tree, and a real prediction path.
Step by step
- Start with samples at the root node.
- Generate candidate feature thresholds.
- Measure impurity before and after each candidate split.
- Choose the best valid gain.
- Repeat on child nodes until a stopping rule creates leaves.
- Route the query through the learned thresholds to a leaf prediction.
Core formulas
Gini impurity
Gini = 1 − Σ pₖ²Low when a node is dominated by one class.
Entropy
H = −Σ pₖ log₂ pₖAlternative uncertainty measure.
Split gain
Gain = I(parent) − weighted I(children)Positive gain means a split reduces impurity.
When to use Decision Tree
- Rule-like nonlinear interactions are plausible.
- You want human-readable threshold decisions.
- Little feature scaling should be required.