Learn practical skills, build real-world projects, and advance your career

Decision Trees and Random Forests


The following topics are covered in this tutorial:

  • Downloading a real-world dataset
  • Preparing a dataset for training
  • Training and interpreting decision trees
  • Training and interpreting random forests
  • Overfitting, hyperparameter tuning & regularization
  • Making predictions on single inputs

How to run the code

This tutorial is an executable Jupyter notebook hosted on Jovian. You can run this tutorial and experiment with the code examples in a couple of ways: using free online resources (recommended) or on your computer.

Option 1: Running using free online resources (1-click, recommended)

The easiest way to start executing the code is to click the Run button at the top of this page and select Run on Colab. You will be prompted to connect your Google Drive account so that this notebook can be placed into your drive for execution.

Option 2: Running on your computer locally

To run the code on your computer locally, you'll need to set up Python, download the notebook and install the required libraries. We recommend using the Conda distribution of Python. Click the Run button at the top of this page, select the Run Locally option, and follow the instructions.

# Video Link: https://www.youtube.com/watch?v=d6xH6k7_Zv4

These models are used a great deal in the real world for their ease of interpretation.