Module 7 · Lesson 2 of 533/56 in the course~22 min
Module lessons (2/5)
Random forests
Lesson preview5 hands-on exercises readyMachine Learning: from first principles to practice · Module 7 — Trees, ensembles and SVMs
Bagging, bootstrap samples, the random forest and the out-of-bag score.
What you'll learn in this lesson
- Explain bagging: training many models on bootstrap samples and averaging them.
- Describe what a random forest adds on top of bagging.
- Use the out-of-bag score as a free validation estimate.
Overview
One deep tree overfits and changes a lot when the training data change (high variance). But the errors of different trees are partly independent: averaging many of them cancels much of the noise while keeping their flexibility. This is the idea of an ensemble.
Bagging (bootstrap aggregating) works like this:
Sections covered in this lesson
- 1The hook: the wisdom of a crowd
- 2Bagging and the bootstrap
- 3Try it: the vote
- 4Comparing single trees, bagging, and random forests
- 5Out-of-bag score
- 6Progressive examples: bagging, OOB checks, and forest diversity
Pro Lesson · Module 7 — Trees, ensembles and SVMs
Unlock "Random forests" and the full Machine Learning: from first principles to practice curriculum
Bagging, bootstrap samples, the random forest and the out-of-bag score.
Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Machine Learning: from first principles to practice plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.