Machine learning

About this lesson: Machine learning

In short

Normal programs follow rules a person wrote. This rule sorts fruit by colour. Run it. Can a person think of a rule for every case in the real world?

Machine learning

What you'll explore

Rules: When rules aren't enough
Normal programs follow rules a person wrote. This rule sorts fruit by colour. Run it. Can a person think of a rule for every case in the real world?
Training: Learn from examples
Machine learning finds patterns in examples instead of rules. Each example has a label, like ‘apple’. Add training examples and watch the model's zones and accuracy change.
Predicting: A fruit it has never seen
A trained model can classify new data. It compares the new fruit with what it learned and gives the most likely label. Try several new fruit.
Bias: Good data, good model
A model only knows what its training data shows. This one never saw a green apple. Compare the biased data with fair data.
Check yourself: Spam filter
An email app learns to spot spam from thousands of emails that people marked as ‘spam’ or ‘not spam’.

Also in this lesson

  • Common mix-ups
  • Three steps
  • Machine learning around you
  • Be the model

Words to know

artificial intelligence
Computer systems doing tasks that normally need human intelligence.
machine learning
A type of AI that learns patterns from examples.
training data
Labelled examples used to train a model.
label
The correct answer attached to an example.
model
The pattern a machine-learning system has learned.
bias
Unfairness caused by data that leaves things out.

Sources

  • Raspberry Pi Foundation: Experience AI
  • Google Teachable Machine

An interactive lesson with a live experiment: move the sliders, press the buttons and answer quick questions. 5 short steps and a 6-question quiz. Free to try. Written and checked by Shalo Lab. Last updated 11 November 2026.

← Making files smaller · Robots and AI →

All lessons in Term 2 · Computing · Age 12