Chapter C04 · Interactive Course

Learning from examples

Follow data to model to output, with no mathematics.

Start chapter in web app

Core Learning Concept

You will inspect a sorter that learns from example messages. Identify what the examples contain, what the intended labels mean, and which messages were kept aside for testing. Then judge how the sorter handles new messages. Good performance on practice examples alone does not show that it will work on unfamiliar ones.

What You’ll Learn in This Chapter

  1. Read a score before you trust one

    Activity 1 of 10 · 7 min

    Read a count as a fraction and a percentage, and name the group it was counted from.

    Every score in this course is a count. Something was checked, some were right, and those numbers become a fraction and percentage. Eight of ten is 8/10 or 80%. Two questions make any score readable: how many were counted, and which ones.

    Start activity →

  2. Data means examples and records

    Activity 2 of 10 · 4 min

    Identify data that could be relevant to a stated learning task.

    Data is recorded information that a system learns from. In our delivery task, each past trip is one recorded example. Before counting data, ask what each example represents: variety matters more than duplicates. Later lessons will show how a model trains on these examples.

    Start activity →

  3. Labels tell us the intended answer

    Activity 3 of 10 · 4 min

    Identify the label in a simple supervised-learning example.

    A label is the answer attached to a training example, such as “signup” for “Please reserve me a place.” The model compares its prediction with that supplied answer while learning. Labels are chosen or collected by people and processes, so an incorrect label can teach an incorrect association.

    Start activity →

  4. Training changes patterns

    Activity 4 of 10 · 4 min

    Describe training as adjusting a model using examples.

    Training is the process of changing a model using examples. The model compares its prediction with the correct label, then adjusts its internal numbers, called parameters. Varied, relevant examples nudge these parameters to reduce future errors.

    Start activity →

  5. The model is what was learned

    Activity 5 of 10 · 4 min

    Distinguish a trained model from its example collection.

    A model is the learned structure used to make predictions. Training produces or changes that structure; using it applies what was learned to an input. Think of practising a sorting task and then using the resulting habit. The analogy is limited: the model operates through computations, not human understanding.

    Start activity →

  6. Using a model is a different step

    Activity 6 of 10 · 4 min

    Distinguish training from applying an existing model.

    Inference means using a trained model to produce a result. When a new message arrives, the sorter applies its existing learned patterns. That prediction does not automatically retrain it. A product might collect feedback for later training, but collecting feedback and updating a model are separate operations.

    Start activity →

  7. Practice examples are not the final test

    Activity 7 of 10 · 4 min

    Explain why evaluation needs examples not used for training.

    A fair test uses examples the model did not practise on. Otherwise it may succeed by remembering familiar cases. Imagine studying a worksheet and then being tested on that same worksheet: a high score says less about handling a new problem. Keep the final test separate from training and tuning.

    Start activity →

  8. Missing examples leave gaps

    Activity 8 of 10 · 4 min

    Recognize how an unrepresentative example set can hurt performance.

    A dataset is a collection of examples gathered for a learning task. When important situations are missing, the dataset has a coverage gap. A model may score 94% overall while failing on dim or unfamiliar examples, hiding who is left out.

    Start activity →

  9. A pattern does not prove a cause

    Activity 9 of 10 · 4 min

    Distinguish association from evidence that one thing caused another.

    A correlation is a pattern in which things occur together. It does not, by itself, show that one causes the other. If urgent messages often contain capital letters, capitals may help predict urgency without creating it. Consider other explanations before turning a predictive pattern into a causal story.

    Start activity →

  10. Test a simple sorter

    Activity 10 of 10 · 7 min

    Inspect a training set, separate training from testing, and explain a failure caused by a missing kind of example.

    Start activity →