Computer Science Grade 7 20 min

Lesson 4: Supervised Learning: Training AI with Labeled Data

Explain supervised learning, where AI models are trained on labeled data to make predictions.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define supervised learning and labeled data. Identify the difference between a 'feature' and a 'label' in a dataset. Explain the three main steps of the supervised learning process: gathering data, training the model, and testing the model. Provide at least two real-world examples of supervised learning. Analyze a simple problem and determine what features and labels would be needed to solve it with supervised learning. How does your email app magically know which messages are junk? 📧 Or how does a photo app automatically recognize your friends in pictures? 🤔 We're going to learn about one of the most common ways to make machines smart, called Supervised Learning. It's like teaching a computer by showing it a ton of examples...
2

Key Concepts & Vocabulary

TermDefinitionExample Supervised LearningA type of machine learning where an AI model is 'taught' using data that already has the correct answers. The AI learns by finding patterns that connect the input data to the correct output labels.Teaching an AI to identify cats by showing it thousands of pictures, each one labeled 'cat' or 'not a cat'. Labeled DataData that has been tagged with a correct answer or category. It's the 'answer key' we give the AI to learn from.A spreadsheet of house information where each row has columns for 'square feet' and 'number of bedrooms', plus a final column labeled 'price' with the actual selling price. FeatureAn individual piece of information or characteristic from the input data t...
3

Core Syntax & Patterns

The Supervised Learning Recipe 1. Gather Labeled Data -> 2. Train the Model -> 3. Test the Model -> 4. Use the Model This is the fundamental four-step process for any supervised learning project. You must have labeled data to start, train the AI to find patterns, test it to see if it works, and then finally use it to make predictions on new, unlabeled data. The Feature-Label Connection Input (Features) -> AI Model -> Output (Predicted Label) The core job of a supervised learning model is to learn a function that maps inputs to outputs. It takes in a set of features (the clues) and, based on its training, predicts the most likely label (the answer).

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
A streaming service wants to predict if a user will finish watching an entire TV series. They have data on which shows users have *clicked on* and *started watching*. What critical piece of information is missing to create the 'label' for this supervised learning problem?
A.The genre of the TV series.
B.The number of episodes in the series.
C.The user's age and location.
D.Whether the user actually watched the series to the end.
Challenging
You are creating a spam filter. Your training data consists of 5,000 emails, but 4,990 are labeled 'spam' and only 10 are labeled 'not spam'. What is the most likely problem this AI model will have after training?
A.It will be very slow at checking new emails.
B.It might learn to just label almost every new email as 'spam' to be accurate on the training data.
C.It will not be able to understand the words inside the emails.
D.It will run out of memory because the 'spam' category is too big.
Challenging
An AI is trained to identify 'dog' or 'cat'. It is then shown a picture of a raccoon and incorrectly predicts 'cat'. Which step of the supervised learning process would you change to help the AI learn to identify raccoons correctly in the future?
A.Step 1: Gather and Label Data, by adding new pictures labeled 'raccoon'.
B.Step 2: Train the Model, by using a faster computer.
C.Step 3: Test the Model, by using fewer test images.
D.Step 4: Use the Model, by asking it to predict faster.

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Chapter 6: Artificial Intelligence (AI) Basics: Making Machines Think

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.