Chapter C04 · Interactive Course
Learning from examples
Follow data to model to output, with no mathematics.
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
-
Read a score before you trust one
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.
-
Data means examples and records
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.
-
Labels tell us the intended answer
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.
-
Training changes patterns
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.
-
The model is what was learned
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.
-
Using a model is a different step
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.
-
Practice examples are not the final test
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.
-
Missing examples leave gaps
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.
-
A pattern does not prove a cause
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.
-
Test a simple sorter
Inspect a training set, separate training from testing, and explain a failure caused by a missing kind of example.