Decision Tree
Single tree that makes predictions using if-then-else rules
Single tree that makes predictions using if-then-else rules.
When to use:
- Need interpretable model
- Want to visualize decisions
- Teaching/explaining ML
- Quick baseline
Strengths: Highly interpretable, visualizable, handles non-linear, no feature scaling needed Weaknesses: Overfits easily, unstable, less accurate than ensembles
Model Parameters
Max Depth Maximum tree depth. Lower = simpler, prevents overfitting.
Min Samples Split (default: 2) Minimum samples to create a split.
Min Samples Leaf (default: 1) Minimum samples in leaf nodes.
Splitter
- best: Choose best split (default)
- random: Random split (faster, more randomness)
Random State (default: 42) Seed for reproducibility.