Learning Objectives
By the end of this topic, you should be able to:
- Define and distinguish between supervised learning, unsupervised learning, and reinforcement learning, and give a real-world example of each.
Learning Activities
To help you meet the learning objectives, we have prepared a combination of readings, activities, and videos.
Course Readings
These reading were designed to introduce the course topics to an audience of educators. They should be considered "required" and read in order.
- Reading 1 – What Does It Mean to Learn? — what distinguishes a system that learns from one that merely follows rules, and why that distinction matters for understanding modern AI
- Reading 2 – Supervised and Unsupervised Learning — the two label-based learning categories, their defining differences, and concrete examples of each
- Reading 3 – Reinforcement Learning and the Big Picture — learning through trial, reward, and penalty; how the three types compare; and the conceptual map you will use to navigate the rest of Week 6 and Week 7
Supplemental Readings
Some participants find it helpful to read about a topic from a source written for a slightly more technical audience. These supplemental readings cover similar material as the course readings but may not fully align with the course learning objectives. Use them as an optional complement to your study, not a substitute for the course readings.
- Reading: IBM, Five machine learning types to know NOTE: We only talk about three of these five in this course.
Lesson Videos
These videos support the readings above and may present the material with some deeper connections and worked examples.
Checking for Understanding, Questions
What Learning Is
- A thermostat turns the heat on when the temperature drops below a set point. A spam filter adjusts its classification rules based on which messages users mark as spam. Which system is learning, and which is just following rules? What is the key difference?
- In your own words, explain what a "model" is in the context of machine learning. What does a model do that the raw training data cannot do on its own?
Supervised and Unsupervised Learning
- For each of the following, identify whether it is an example of supervised or unsupervised learning, and explain your reasoning:
- A system trained on thousands of labeled X-ray images (each labeled "pneumonia" or "no pneumonia") to detect pneumonia in new X-rays.
- A system that analyzes five years of student performance data and discovers three distinct student profiles that no administrator had previously identified.
- A handwriting recognition system trained on labeled examples of handwritten digits.
- A music streaming service that groups listeners into clusters based on listening patterns, without any predefined genre categories.
- Supervised learning requires labeled training data. Where do those labels come from? Describe one scenario where labeling is easy and one where it is expensive or difficult. What are the implications for which problems supervised learning can be applied to?
Reinforcement Learning
- A game-playing agent starts knowing nothing about the rules of chess. After playing millions of games against itself, it becomes stronger than any human player. What type of learning is this? What signal does the agent use to improve?
- Explain why reinforcement learning is a better fit than supervised learning for teaching an agent to play a video game. What would supervised learning require that is impractical in this context?
Putting It Together
- A school district wants to build an AI system that predicts which students are likely to struggle on a state standardized test, using three years of historical student data where test outcomes are known.
- Which learning type is most appropriate here? Why?
- What would the training data need to include?
- What ethical questions should the district ask before deploying such a system? (Connect to the Week 5 data mining scenarios if helpful.)
- Reinforcement learning and unsupervised learning will appear in Week 7. Supervised learning techniques appear in Topics 6d and 6e this week. Without looking ahead, predict: which type do you think will be hardest to implement? Which do you think produces the most transparent, explainable results? Be ready to revisit your answers after Week 7.
Checking for Understanding, Answers
You can compare your answers to the following answer key.
Show Answer Key
What Learning Is
- The spam filter is learning; the thermostat is just following rules. The key difference: the thermostat's behavior is fixed by its programming — it always does the same thing when temperature drops below the threshold, and no experience changes that. The spam filter's internal rules change based on feedback from users. Its behavior on future emails is different from what it would have been before that feedback — it has modified its own classification criteria from experience. That self-modification is what makes it a learner.
- A model is a compact representation of patterns extracted from training data — a learned function that can make predictions or classifications on new, unseen inputs. Raw training data is a collection of past examples; it cannot say anything about inputs it has never seen. A model generalizes from those examples — it captures the underlying relationship between inputs and outputs well enough to make useful predictions about new cases. A decision tree, for example, is a model: it encodes what the training data revealed about which attributes predict which outcomes, in a form that can be applied to any new input.
Supervised and Unsupervised Learning
-
- X-ray pneumonia detection: Supervised. Each training image has a label (pneumonia / no pneumonia) provided by human experts. The model learns to map image features to the correct label.
- Three previously unknown student profiles: Unsupervised. No one told the system what groups to look for — it found structure in the data on its own, with no predefined labels.
- Handwriting recognition: Supervised. Each handwritten digit image is labeled with the correct digit (0–9) by a human. The model learns to map image appearance to the correct label.
- Music streaming clusters: Unsupervised. There are no predefined genre labels; the system discovers groupings of listeners based on similarity in listening behavior without being told what the groups should be.
- Labels come from human expertise or historical records — someone (or some existing system) must have already correctly classified the examples used for training. Easy labeling: handwritten digit recognition — anyone can look at a handwritten "7" and label it 7; labeling is fast and cheap. Expensive or difficult labeling: medical image diagnosis — labeling requires expert radiologists or pathologists; labels take time, cost money, and may require multiple experts to agree. The implication: supervised learning works best when labeled data already exists or is inexpensive to produce. Problems where labeling is scarce (rare diseases, new domains) may require unsupervised approaches or be impractical to address with supervised methods.
Reinforcement Learning
- This is reinforcement learning. The agent uses the outcome of each game as its training signal: winning provides a reward, losing provides a penalty. Over millions of games, it adjusts its decisions to maximize wins. There are no labeled training examples — no one tells the agent what the correct move was in a given position. It discovers what works through trial and error, guided by the win/loss outcome.
- Supervised learning would require labeled training examples — pairs of (game state, correct action) provided by an expert for every possible situation the agent might encounter. For a video game with millions of possible states, creating that labeled dataset is completely impractical, and no single "correct" action exists for most states anyway (many strategies can work). Reinforcement learning sidesteps this: the environment itself provides feedback (score, winning, losing) without any human needing to pre-specify what the right action is in each situation.
Putting It Together
- Most appropriate type: supervised learning. The district has three years of historical data where test outcomes are already known — those known outcomes are exactly the labels needed for supervised learning. The system learns to map student characteristics to "struggled" or "did not struggle" using labeled examples. Training data would need to include: student attributes that might predict test performance (attendance, grades in related subjects, assessment scores, etc.) paired with actual test outcomes (passed/struggled) for each student in the historical data. Ethical questions (connecting to Week 5): Does the historical data encode past inequities that the model will amplify? Does the model treat correlation as causation, leading to misidentification of at-risk students? Who controls access to the risk scores? How are scores used, and by whom? What happens to students falsely identified as at-risk or falsely cleared?
- This question is intentionally open-ended — answers will vary, and the goal is to form a prediction to revisit after Week 7. A reasonable response might predict that reinforcement learning is hardest to implement (it requires an interactive environment and enormous amounts of trial-and-error experience) and that decision trees produce the most transparent results (the rules can be stated explicitly). Be ready to revise based on what Topics 6d and 6e reveal about decision trees and neural networks, and what Week 7 reveals about reinforcement and unsupervised learning.
Extend Your Learning
The following resources go a little deeper on topics we touched on but did not fully explore in the readings. These are entirely optional — none of this material appears on the Competency Demo — but each one is a natural "next question" from something covered this week.
-
Semi-supervised learning
A hybrid approach that uses a small amount of labeled data together with a large amount of unlabeled data — often more practical than pure supervised learning when labeling is expensive. This article from IBM covers how semi-supervised learning works and where it is used in practice.
What is Semi-Supervised Learning? — IBM