Online Course
Machine Learning with Decision Trees and Random Forests

Master Decision Trees and Random Forests: from theoretical foundations to practical applications

4.8

863 reviews on
4,934 students already enrolled
  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Skill level:

Intermediate

Duration:

1 hour
  • Lessons (1 hour)
  • Practice exams (6 minutes)

CPE credits:

3
CPE stands for Continuing Professional Education and represents the mandatory credits a wide range of professionals must earn to maintain their licenses and stay current with regulations and best practices. One CPE credit typically equals 50 minutes of learning. For more details, visit NASBA's official website: www.nasbaregistry.org

Accredited

certificate

What you learn

  • Master Decision Trees and Random Forests for data analysis.
  • Understand the pros and cons of these ML algorithms.
  • Build and optimize predictive models using these techniques.
  • Integrate math concepts with hands-on Python programming.
  • Plan, execute, and deliver a complete ML project independently.

Topics & tools

TheoryPythonMachine LearningProgrammingDecision TreesRandom ForestMachine and Deep Learning

Your instructor

Course OVERVIEW

Description

CPE Credits: 3 Field of Study: Information Technology
Delivery Method: QAS Self Study
Decision trees and random forests are tools that every data scientist or machine learning practitioner should be familiar with. Famous for producing good predictors, these methods are also indispensable when it comes to understanding the problem at hand, as well as visualizing and communicating your results. That’s why we have prepared this course for you. The first part features a thorough explanation of the workings of decision trees, how to code and visualize them with sklearn, and the pros and cons you should consider. Then we will build on the concept of a single decision tree to produce the random forest algorithm. Finally, we will cap it all off with a practical example implementing both decision trees and random forests in Python to predict a person’s income based on census data.

Prerequisites

  • Python (version 3.8 or later), Streamlit library, OpenAI API key, and a code editor or IDE (e.g., VS Code or Jupyter Notebook)
  • Intermediate Python skills are required.
  • Familiarity with basic statistics and linear algebra is helpful but not mandatory.

Curriculum

20 lessons 27 exercises 2 exams
  • 1. Introduction to Decision Trees and Random Forests
    5 min
    In this introductory section, you will get to know your instructor, go over the contents of the course, and discover why mastering ML with Decision Trees and Random forests is essential for progressing your predictive analytics skillset.
    5 min
    In this introductory section, you will get to know your instructor, go over the contents of the course, and discover why mastering ML with Decision Trees and Random forests is essential for progressing your predictive analytics skillset.
    What does the course cover? Free
  • 2. Setting up the Environment
    4 min
    Section 2 prepares you for the practical part of the course by guiding you through the process of installing all relevant Python packages.
    4 min
    Section 2 prepares you for the practical part of the course by guiding you through the process of installing all relevant Python packages.
    Setting up the environment Free
    Installing the relevant packages Free
  • 3. Decision Trees
    46 min
    This is the main section of the course where we will use visual examples to make sense of the concept of decision trees. We will cover the advantages and disadvantages of this method and find out what goes into building decision tree models. You will also learn about a popular technique known as tree pruning. In order to apply your newly found skills, you will be diving into a practical example of how to create decision trees with sklearn.
    46 min
    This is the main section of the course where we will use visual examples to make sense of the concept of decision trees. We will cover the advantages and disadvantages of this method and find out what goes into building decision tree models. You will also learn about a popular technique known as tree pruning. In order to apply your newly found skills, you will be diving into a practical example of how to create decision trees with sklearn.
    What Is a Tree in Computer Science? Free
    Exercise
    The Concept of Decision Trees Free
    Decision Trees in Machine Learning Free
    Exercise
    Decision Trees: Pros and Cons Free
    Exercise
    Practical Example: The Iris Dataset Free
    Practical Example: Creating a Decision Tree Free
    Practical Example: Plotting the Tree
    Decision Tree Metrics Intuition: Gini Impurity
    Exercise
    Decision Tree Metrics: Information Gain
    Exercise
    Tree Pruning: Dealing with Overfitting
    Exercise
  • 4. Random Forests
    35 min
    The final section of this course is dedicated to the random forest algorithm. We will learn about bootstrapping and bagged decision trees – all steps towards the creation of a random forest. It is important to understand the distinction in applications between decision trees and random forests, so this is included as well. Finally, we conclude this section and the course with a comprehensive case study. The first half of our practical example is dedicated to showing you how to implement random forests in sklearn. After that, we will model a person’s salary based on various census features. We will create both a decision tree and a random forest model for this dataset and compare the performance of each.
    35 min
    The final section of this course is dedicated to the random forest algorithm. We will learn about bootstrapping and bagged decision trees – all steps towards the creation of a random forest. It is important to understand the distinction in applications between decision trees and random forests, so this is included as well. Finally, we conclude this section and the course with a comprehensive case study. The first half of our practical example is dedicated to showing you how to implement random forests in sklearn. After that, we will model a person’s salary based on various census features. We will create both a decision tree and a random forest model for this dataset and compare the performance of each.
    Random Forest as Ensemble Learning
    Exercise
    Bootstrapping
    From Bootstrapping to Random Forests
    Exercise
    Random Forest in Code – Glass Dataset
    Census Data and Income – Preprocessing
    Training the Decision Tree
    Training the Random Forest
    Practice exam
  • 5. Course exam
    50 min
    50 min
    Course exam

Free lessons

What does the course cover?

1.1 What does the course cover?

5 min

Setting up the environment

2.1 Setting up the environment

1 min

Installing the relevant packages

2.2 Installing the relevant packages

3 min

What Is a Tree in Computer Science?

3.1 What Is a Tree in Computer Science?

4 min

The Concept of Decision Trees

3.3 The Concept of Decision Trees

3 min

Decision Trees in Machine Learning

3.4 Decision Trees in Machine Learning

5 min

Start for free

94%

of AI and data science graduates

successfully change

or advance their careers.

96%

of our students recommend

365 Data Science.

9 in 10

of our graduates landed a new AI & data job

after enrollment

ACCREDITED certificates

Craft a resume and LinkedIn profile you’re proud of—featuring certificates recognized by leading global institutions.

Earn CPE-accredited credentials that showcase your dedication, growth, and essential skills—the qualities employers value most.

  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Certificates are included with the Self-study learning plan.

A LinkedIn profile mockup on a mobile screen showing Parker Maxwell, a Certified Data Analyst, with credentials from 365 Data Science listed under Licenses & Certification. A 365 Data Science Certificate of Achievement awarded to Parker Maxwell for completing the Data Analyst career track, featuring accreditation badges and a gold “Verified Certificate” seal.

How it WORKS

  • Lessons
  • Exercises
  • Projects
  • Practice exams
  • AI mock interviews

Lessons

Learn through short, simple lessons—no prior experience in AI or data science needed.

Try for free

Exercises

Reinforce your learning with mini recaps, hands-on coding, flashcards, fill-in-the-blank activities, and other engaging exercises.

Try for free

Projects

Tackle real-world AI and data science projects—just like those faced by industry professionals every day.

Try for free

Practice exams

Track your progress and solidify your knowledge with regular practice exams.

Try for free

AI mock interviews

Prep for interviews with real-world tasks, popular questions, and real-time feedback.

Try for free

Student REVIEWS

A collage of student testimonials from 365 Data Science learners, featuring profile photos, names, job titles, and quotes or video play icons, showcasing diverse backgrounds and successful career transitions into AI and data science roles.