Week 4

Author

Huanfa Chen

Published

March 25, 2026

Introduction

This week will introduce tree-based methods for supervised learning, including decision trees, random forests, and gradient boosting.

Learning Objectives

By the end of this week, you will be able to:

  1. Understand the design and training of decision trees.
  2. Understand the principle of ensemble methods, including bagging and boosting.
  3. Understand the design and strengths of random forests and gradient boosting machines.
  4. Can apply tree-based methods from proper libraries (random forest from sklearn and XGBoot from XGBoost).

Lecture

  • To access the lecture notes: Lecture
  • An UPDATED lecture notes with more explanation on decision tree & impurity: UPDATED Lecture

Quiz

To access the quiz on Moodle, please check Moodle page.

Practical

Note

To save a copy of notebook to your own GitHub Repo: follow the GitHub link, click on Raw and then Save File As... to save it to your own computer. Make sure to change the extension from .ipynb.txt (which will probably be the default) to .ipynbbefore adding the file to your GitHub repository.

To access the practical:

  1. Preview
  2. Download

Further resources