Skip to content
M.U.N.U.O.Data × AI × Systems

Machine Learning Foundations

Decision Trees and Random Forests

Module 6 of 10

Learning objectives

  • Explain the ideas behind decision trees and random forests.
  • Apply the ideas to the example and identify how you would check the result.

Concepts

A tree recursively tests features to make groups purer. Leaves make predictions using their assigned training rows. A random forest aggregates trees built from resampled data and randomized feature choices, which can reduce variance.

Practical example

Classify delayed deliveries using distance and departure time. Compare a shallow tree with a forest on held-out deliveries.

Try the exercise
  1. Define the task. Classify delayed deliveries using distance and departure time. Compare a shallow tree with a forest on held-out deliveries.
  2. Identify the key idea. A tree recursively tests features to make groups purer.
  3. Check your decision. Describe an alternative and how you would compare its results.
Open the interactive lab

Knowledge check

What does an internal node do?

What can a forest reduce?

How can you limit a tree's complexity?