Home›Lesson Plans›Computer Science›AI · Grade 12

How Machine Learning Works

Twelfth graders go beyond "AI is magic" to how machine learning actually works: collect example data, train a model to spot patterns, test it on new data, use it to predict, then improve. They order the pipeline, then reason about where ML can go wrong.

Grade 12How Machine Learning Works55 minutes1 class periodCSTA / ISTEExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Explain machine learning.
  • ✓Order the ML pipeline.
  • ✓See why data quality matters.
  • ✓Spot where it fails.
Essential Question

How does a machine actually "learn" from data?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Put in Order · Interactive

Order the ML Pipeline

Project this and have students put the machine-learning steps in order.

🤖 Put the machine-learning pipeline in orderTry it
Tap the first step of training a model!
The Lesson · Explicit teaching

55 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — Not Magic

6 min

How does a photo app learn to recognize your face?

👩‍🏫 Teacher Moves

  • Pose the question.
  • Share ideas.
  • Set the goal.

🎒 Student Actions

  • Think.
  • Share.
  • Get ready.
2

Use — Machine Learning

13 min

Students learn.

👩‍🏫 Teacher Moves

  • Send students to Order the ML Pipeline.
  • Order the steps.
  • Note it learns from data.

🎒 Student Actions

  • Order.
  • Say.
  • Note it.
3

Modify — Trace It

14 min

Students practice.

👩‍🏫 Teacher Moves

  • Name what training needs.
  • Say why we test on new data.
  • Explain "improve."

🎒 Student Actions

  • Name.
  • Say.
  • Explain.
4

Create — Reason It

15 min

Students apply.

👩‍🏫 Teacher Moves

  • Pick an ML use case.
  • Name what data it needs.
  • Spot a way bias could creep in.

🎒 Student Actions

  • Pick.
  • Name.
  • Spot.
5

Reflect — Reflect

7 min

Students close.

👩‍🏫 Teacher Moves

  • Say the first step.
  • Say why data quality matters.
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Say it.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.

CSTA
3B-AP-08

Describe how AI/ML artifacts are developed.

CSTA
3B-DA-07

Evaluate data used to train models.

CSTA
3A-AP-21

Evaluate algorithms and their outputs.

ISTE
5a

Understand how automation and ML work.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Pipeline diagram.
  • Frame: "it learns by seeing ___."
  • Use the face example.

Support & Access

IEP / 504
  • Use 3 core steps.
  • Use a visual.
  • One concrete example.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Explain overfitting simply.
  • Find biased-data examples.
  • Compare ML to rule-based code.
Materials

What to gather

  • 📽️Screen / board
  • 🤖ML pipeline cards
  • 💻Order the ML Pipeline
  • 📋Use-case sheet
  • 📓Notebooks
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

machine learninglearning patterns from datamodelwhat the ML system buildstraining dataexamples it learns frompatterna regularity in datapredictionthe model’s outputtest datanew data to check itbiasunfair skew from bad dataaccuracyhow often it is right
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
What is the first step in machine learning?
Collect lots of example data.
QUESTION 2
Why test on new, unseen data?
To check it really learned, not just memorized.
QUESTION 3
Why does data quality matter?
Biased or bad data leads to a biased, bad model.

Reflect: how machine learning works.

Have students pick an ML use case and spot where bias could creep in. A printable use-case sheet is in the CS library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 How Machine Learning WorksFlip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 How Machine Learning WorksQuiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

Printable worksheet

A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.

🖨️ How Machine Learning WorksPrint
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: accuracy, bias, machine learning, model, pattern, prediction, test data, training data
  1. how often it is right
  2. what the ML system builds
  3. learning patterns from data
  4. examples it learns from
  5. unfair skew from bad data
  6. the model’s output
  7. a regularity in data
  8. new data to check it

Part B · Show what you learned

  1. What is the first step in machine learning?
  2. Why test on new, unseen data?
  3. Why does data quality matter?
Answer key — Part A: 1) accuracy · 2) model · 3) machine learning · 4) training data · 5) bias · 6) prediction · 7) pattern · 8) test data
Part B: 1) Collect lots of example data. 2) To check it really learned, not just memorized. 3) Biased or bad data leads to a biased, bad model.