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
- Define the task. Classify delayed deliveries using distance and departure time. Compare a shallow tree with a forest on held-out deliveries.
- Identify the key idea. A tree recursively tests features to make groups purer.
- Check your decision. Describe an alternative and how you would compare its results.