aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← 10. Decision Trees & Ensemble Learning
Lesson 1 of 6 9 min · 144 words

Decision trees

A sequence of yes/no questions leading to a prediction.

A decision tree predicts by asking a sequence of yes/no questions about the features. Each internal node tests one feature against a threshold ('age < 30?'), each branch is an answer, and each leaf holds a prediction — the majority class (classification) or the mean target (regression).

Trees are built greedily, top-down: at each node, try every feature and threshold, pick the split that makes the children purest, and recurse. Stop when nodes are pure, too small, or a maximum depth is reached.

Strengths: easy to explain and visualise, handle numerical and categorical features, need no feature scaling, capture non-linear interactions. Weakness: a deep tree overfits easily, and small changes in data can produce a very different tree (high variance).

Formula to remember

Entropy

0 for a pure node, 1 bit for a 50/50 split.

Quick check · +5 XP

Entropy of a 50/50 binary node is…

Practice this topic
Saved in this browser as you type.
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser