Computer Science Grade 7 20 min

Lesson 3: Machine Learning: Learning from Data

Introduce machine learning as a type of AI where machines learn from data without explicit programming.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define Machine Learning (ML) and explain how it differs from traditional programming. Identify the three main types of machine learning: supervised, unsupervised, and reinforcement. Explain the critical role of data in training a machine learning model. Describe the basic workflow of an ML project: data collection, training, and prediction. Provide at least three real-world examples of machine learning they use every day. Recognize the importance of using large, unbiased datasets for training. Explain what a feature and a label are in the context of a dataset. Ever wonder how TikTok or YouTube knows exactly what video you want to watch next? 🤖 It's not magic, it's machine learning! In this lesson, we'll explore how we can teach computer...
2

Key Concepts & Vocabulary

TermDefinitionExample Machine Learning (ML)A type of artificial intelligence that gives computers the ability to learn from data and find patterns on their own, without being explicitly programmed for every single step.Instead of writing code with `if` statements for every type of spam email, we 'train' a model by showing it thousands of examples of spam and not-spam emails, and it learns how to tell the difference itself. DataThe information, such as images, text, or numbers, that is used to teach a machine learning model.For a weather prediction model, the data would be past information about temperature, humidity, wind speed, and whether it rained. TrainingThe process of feeding data to a machine learning model so it can learn to find patterns or make correct decisions.Showin...
3

Core Syntax & Patterns

The Basic ML Workflow 1. Gather Data -> 2. Train Model -> 3. Make Predictions This is the fundamental three-step pattern for almost any machine learning project. You need information to learn from, a process for learning, and a way to use what was learned. The GIGO Principle Garbage In, Garbage Out A machine learning model is only as good as the data it's trained on. If you train a model with bad, incomplete, or biased data, it will make bad, incomplete, or biased predictions. The Three Learning Styles Supervised (labeled data), Unsupervised (unlabeled data), Reinforcement (rewards/penalties) These are the main ways a machine can learn. We choose a style based on the problem we want to solve and the kind of data we have available.

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
You want to create a new mobile app that can identify any plant from a photo. Synthesizing what you've learned, what would be the best first step in this ML project?
A.Gather a large, diverse, and accurately labeled dataset of plant images (the features) and their species names (the labels).
B.Start by writing the code for the app's user interface and color scheme.
C.Choose the fastest computer you can find to run the final model.
D.Use reinforcement learning to reward the app every time it guesses a plant correctly.
Challenging
A developer creates a movie recommendation model. They train it using data only from users who are 13-year-old boys. They then release it to the public. Which statement best critiques this project plan?
A.The plan is excellent because 13-year-old boys watch the most movies.
B.The plan is flawed because the model will be too slow if it has too much data.
C.The plan is critically flawed due to severe data bias; the model will likely give poor recommendations to adults, girls, and other groups.
D.The plan is flawed because unsupervised learning should have been used to group the movies by genre first.
Challenging
Which statement best synthesizes how a supervised model uses features and labels during the training process to 'learn'?
A.The model memorizes every single feature and its corresponding label, like a giant flashcard deck.
B.The model adjusts its internal mathematical weights, trying to find a formula that consistently maps the input features to the correct output labels across all the data.
C.The model ignores the features and focuses only on the labels, trying to find the most common label.
D.The model looks at the labels first to group the data, and then it calculates the average features for each group.

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.