Lesson 3 8 min

Learn from labelled examples

Choose a clue using labels and predict a label for a fresh example.

Learning goal

I can pick a useful feature from labelled examples and test a prediction.

How it works

A label tells the model which category a training example belongs to. A feature is a detail it could use, such as colour or width. Humans choose and check the examples. A real model may look at many features at once.

Think of it like this

It’s like noticing how two labelled baskets hold different things. The labels help you link what you see to a category. Our toy sorter uses one feature at a time, while real models can learn much more complicated patterns.

Worked example

The fictional bank at Mist Pond has two training leaves: Meadow is wide and green, Reed is thin and green. Green appears in both, so width is useful on these two cards. A thin yellow leaf gets a Reed prediction. Its true label is hidden until you check. When it turns out to be Meadow, you have learned something about the limits of the width clue.

What to remember

Use the labels to learn a pattern. Check the pattern on fresh examples.

  1. Training cardsWide green: Meadow. Thin green: Reed.
  2. Pick a featureWidth separates the two labels. Colour stays green.
  3. Fresh cardUse the width clue on a thin yellow leaf.
The same training examples can contain useful clues and distracting ones.

Key words

Machine learning
A way to make a model by learning patterns from examples. The model can use those patterns on new examples.
Label
An answer or category attached to an example. A card might have the label “pointy” or “round.”
Training data
Examples a model uses to learn patterns. The examples you choose can affect what it learns.
More Machine Learning lessons

Activity

Train the leaf sorter

Watch a training and test round

This toy classifier picks one clue from two choices. Real models can combine many clues.

Read the steps
  1. Train. Wide green leaves are labelled Meadow. Thin green leaves are labelled Reed.
  2. Choose a clue. Width separates the labels in training. Green is shared by both.
  3. Test. Predict a label for a fresh thin yellow leaf. Then turn over its label.

Try it on paper

Materials Drawn leaf cards or a classmate to read the labels aloud.

  1. Draw a wide green Meadow leaf and a thin green Reed leaf. Compare colour and width.
  2. Write a rule for the toy sorter based on the clue that splits the labels. Set the training cards aside.
  3. Draw a thin yellow leaf. Predict Reed using width. Flip a pretend label that says Meadow and record the miss.

Talk it through The fictional Meadow plant can have thin leaves too. Ask which extra Meadow example might help a new model.

Quick check

1. What is the label on “wide green, Meadow”?
Answer and explanation

Meadow. The label gives the example’s category. Width and colour are features the sorter can look at.

2. Under the width clue, what will it guess for a thin yellow leaf?
Answer and explanation

Reed. The toy sorter uses width. The real label is a separate fact to check.