juniorDecision Trees
What is a Decision Tree?
Updated Feb 20, 2026
Short answer
A decision tree is a model used in machine learning that makes decisions by splitting data into branches based on conditions.
Deep explanation
A decision tree works like a flowchart. It starts with a single question at the top (called the root node). Based on the answer (yes/no or a value condition), the data is split into smaller groups. This process continues until it reaches a final decision (called a leaf node). Each internal node represents a test on a feature, and each branch represents the outcome of that test.
Real-world example
A bank deciding whether to approve a loan might use a decision tree.
- Is income > $50,000?
- Yes → Approve loan
- No → Check credit score
- Good credit → Approve loan
- Bad credit → Reject loan
Common mistakes
- - Thinking it always gives perfect decisions (it can overfit data).
- - Assuming it works only for yes/no problems (it can also handle numeric data).
- - Ignoring that deep trees can become too complex and inaccurate on new data.
Follow-up questions
- What is overfitting in decision trees?
- What is pruning?
- How do decision trees choose the best split?