Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 1

Types of Machine Learning: Supervised, Unsupervised, and Reinforcement

Recommended resources

Introduction

Welcome to your course on Machine Learning for the Google Cloud Professional ML Engineer certification. As this is our first lesson, we'll start with the most fundamental concept: the different paradigms of machine learning. Your goal is to pass the certification exam, and a solid grasp of these core concepts is the essential foundation for everything that follows.

This lesson addresses the learning outcome: Distinguish between supervised, unsupervised, and reinforcement learning with examples of when to use each.

We will break down machine learning into its three main categories. For each category, we will explore:

  • The type of data it uses.
  • The kind of problems it aims to solve.
  • The core mechanism through which it "learns."

Understanding this high-level map is crucial. When you encounter a business problem, your first step will be to identify which of these learning paradigms is the right tool for the job.


The Three Paradigms of Machine Learning

At the highest level, machine learning algorithms are categorized based on how they learn from data. The three main types are Supervised Learning, Unsupervised Learning, and Reinforcement Learning.

To get a quick overview of all three, let's start with a video that introduces them with helpful analogies.

Supervised vs Unsupervised vs Reinforcement Learning | Data Science Certification Training | Edureka

This video from edureka! provides a clear initial analogy for each of the three learning types. It will help you build a quick mental model for each one.

Watch the segment from 02:09 to 04:30. Pay attention to the analogies used: a teacher for supervised learning, an adult for unsupervised learning, and being on an isolated island for reinforcement learning.

Now, let's dive into each of these paradigms in more detail.


1. Supervised Learning: Learning with a Teacher

Supervised learning is the most common type of machine learning. The core idea is simple: you provide the algorithm with a dataset where you already know the correct answers. This "labeled" dataset acts as a teacher, showing the model what output to produce for a given input.

The goal is to learn a mapping function that can predict the output (label) for new, unseen inputs.

Supervised Learning Definitions and Examples

For a formal definition and a business-focused example, please read the following two excerpts. The first, from Google Cloud, provides a concise definition. The second, from phdata.io, gives a practical business application.

In the Google Cloud article 'What is Machine Learning?', read the paragraph defining Supervised learning. It starts with 'Supervised learning is a machine learning model that uses labeled training data...'.

Supervised vs. Unsupervised vs. Reinforcement Learning

Now, read the section 'What is Supervised Learning?' in the phdata.io article. Focus on the customer churn example, which illustrates how labeled historical data (whether a customer is still active) is used to predict a future outcome.

When to Use Supervised Learning

You use supervised learning when you have a specific target you want to predict and have historical data with known outcomes.

There are two main types of supervised learning problems:

  • Classification: The goal is to predict a discrete category or class.
    • Example: Is this email spam or not spam?
    • Example: Based on a customer's profile, will they churn or not churn?
  • Regression: The goal is to predict a continuous numerical value.
    • Example: What is the estimated price of this house?
    • Example: How many days until this machine component fails?

We will explore classification and regression in much more detail in the next lesson.


2. Unsupervised Learning: Finding Hidden Patterns

In unsupervised learning, you work with data that has no labels. The algorithm is given a dataset and tasked with finding interesting structures, patterns, or groups within it on its own, without a "teacher" to guide it.

The goal is not to predict a specific outcome, but to explore and understand the data's underlying structure.

Unsupervised Learning Definitions and Examples

Let's look at the formal definition and a business case for unsupervised learning. Again, we'll start with the Google Cloud article for the definition and then the phdata.io article for a practical example.

In the Google Cloud article, read the paragraph defining Unsupervised learning. It begins with 'Unsupervised learning is a machine learning model that uses unlabeled data...'.

Supervised vs. Unsupervised vs. Reinforcement Learning

Now, read the section 'What is Unsupervised Learning?' in the phdata.io article. The email marketing campaign example is key here; it shows how you can group customers into segments (clusters) without pre-existing labels, allowing for targeted marketing.

When to Use Unsupervised Learning

You use unsupervised learning when you don't have labeled data and want to discover inherent patterns or groupings.

Common unsupervised learning tasks include:

  • Clustering: Grouping similar data points together.
    • Example: Segmenting customers into different purchasing behavior groups for targeted marketing.
    • Example: Grouping news articles by topic.
  • Association: Discovering rules that describe relationships between data points.
    • Example: "Market basket analysis," where you find that customers who buy bread also tend to buy milk.
  • Dimensionality Reduction: Simplifying data by reducing the number of variables, which can be useful for visualization or as a preprocessing step for a supervised learning model.

3. Reinforcement Learning: Learning from Experience

Reinforcement Learning (RL) is a different paradigm altogether. It's not about learning from a static dataset. Instead, it involves an agent that learns to make decisions by performing actions in an environment to achieve a goal.

The agent learns through trial and error. It receives a reward for actions that lead it closer to the goal and a penalty for actions that do not. The objective is to learn a policy—a strategy for choosing actions—that maximizes the total cumulative reward over time.

Given your interest in agentic engineering, you can think of RL as the foundational framework for building autonomous agents that learn optimal behavior in dynamic environments.

Reinforcement Learning Definitions and Examples

To understand this concept, let's review the definition and a classic example.

In the Google Cloud article, read the paragraph defining Reinforcement learning. It starts with 'Reinforcement learning is a machine learning model that can be described as “learn by doing”...'. The AlphaGo example is a famous demonstration of RL's power.

Supervised vs. Unsupervised vs. Reinforcement Learning

Now, read the section 'What is Reinforcement Learning?' in the phdata.io article. The autonomous driving example clearly explains the concepts of an agent (the car), environment (the road), states, actions, and rewards.

When to Use Reinforcement Learning

You use reinforcement learning for problems that can be framed as an agent interacting with an environment to achieve a long-term goal. It's ideal for sequential decision-making problems.

  • Example: Training a program to play a game like chess or Go, where the goal is to win (maximize the reward).
  • Example: Robotics, where a robot learns to walk or manipulate objects.
  • Example: Optimizing the cooling systems in a data center to minimize energy consumption.

Summary and Comparison

To summarize the key distinctions, examine the following table. It provides a concise, side-by-side comparison that is useful for quick recall, which is valuable for exam preparation.

Comparison of Supervised, Unsupervised, and Reinforcement Learning
This table contrasts the three learning paradigms across several key dimensions: the type of data they use, their primary goal, their feedback mechanism, and the typical problems they are used to solve.

A simple decision framework:

  1. Do I have labeled data and a specific target to predict? → Use Supervised Learning.
  2. Do I only have data without labels and want to find hidden structures? → Use Unsupervised Learning.
  3. Do I have an interactive environment where an agent can learn through trial and error to achieve a long-term goal? → Use Reinforcement Learning.

Note that there is also semi-supervised learning, a hybrid approach where you have a large amount of unlabeled data and a small amount of labeled data. This is often used when labeling data is expensive or time-consuming.


Conclusion

In this lesson, you've learned to distinguish between the three fundamental paradigms of machine learning.

  • Supervised Learning uses labeled data to train a model to make predictions. It's like learning with a teacher.
  • Unsupervised Learning uses unlabeled data to discover hidden patterns and structures. It's about finding insights on your own.
  • Reinforcement Learning involves an agent learning optimal behavior through trial and error in an environment, guided by rewards and penalties.

This high-level understanding is the first and most critical step in framing any machine learning problem.

In our next lesson, we will dive deeper into the tasks associated with the most common paradigms, supervised and unsupervised learning. We will focus on how to differentiate between classification, regression, and clustering tasks given a business problem.