Skip to content
Back to course

8.3 Decision Trees

A decision tree makes predictions by asking a series of simple questions about the input, splitting the data step by step. Each internal node is a test on one feature, each branch is an answer, and each leaf gives a final prediction. They work for both classification and regression.

A decision tree splits data through yes/no questions until it reaches a leaf prediction.

Imagine a health worker deciding whether a patient needs a malaria test: first 'Has fever?', then 'Visited a malaria area?', then 'Has chills?'. Each answer narrows the decision, just like a decision tree.

Scenario

You need a model whose decisions a non-technical manager can read and explain. Which property of decision trees helps most?

Check your understanding

1/4 · 40 XP

In a decision tree, what does a leaf node represent?