<aside> 🗺️
Module 5 · Decision Trees - 20 Questions for ML · Supervised Learning · 30-45 min
After this module, you'll understand how decision trees make predictions, why they're interpretable, and how to prevent overfitting.
</aside>
You're a data scientist at StreamCart. The support team wants to know why certain customers churn, not just predictions. They need rules they can act on.
Logistic regression gives you a probability, but the PM asks: "Can you give me simple rules like 'If X and Y, then high risk'?"
That's what decision trees do.
A decision tree is like playing 20 Questions:
Each question splits the data into two groups. After enough splits, you reach a prediction.
Key insight: Trees learn WHICH questions to ask and WHERE to put the thresholds by finding splits that best separate the classes.
Trees divide the feature space into rectangular regions: