Why evaluate, and the train-test split
The leaf app scored 99% at the exhibition. In the orchard it was wrong again and again. Both were true.
- Split data into training and testing
- Catch a model that memorised
- Say why a test must use unseen data
Why evaluate, and the train-test split
The leaf app scored 99% at the exhibition. In the orchard it was wrong again and again. Both were true.
- Split data into training and testing
- Catch a model that memorised
- Say why a test must use unseen data
Story
Learn it
The exhibition app really did score 99%, on the same 200 photos it had learned from. That measured its memory, not its skill. Model evaluation is a model's report card, and the only honest score comes from data it has never seen. So before training, the labelled data is split: a training set to learn from, and a testing set locked away until the end.
Words to know
using measurements to understand how well a model works. CBSE calls it the model's report card.
one such measurement, like accuracy.
dividing labelled data into a training set (to learn from) and a testing set (to check with).
examples the model never saw while learning. Only its score on these estimates real-world performance.
a model that remembers its training data instead of learning the pattern. It scores brilliantly on training data and badly on new data.
Step by step: the student who memorised
A teacher gives 20 practice questions. Two students prepare:
| Practice score (training) | New exam questions (testing) | |
|---|---|---|
| Sana learned the method | 18 / 20 | 17 / 20 |
| Umer memorised the answers | 20 / 20 | 6 / 20 |
- Look only at practice: Umer looks better, 20 against 18.
- Test on new questions: Umer collapses to 6. He remembered answers; he never learned the method.
- That is overfitting: perfect on what it has seen, poor on what it hasn't.
- Models do the same. Test on training data and a memorising model looks perfect. Only the testing set shows which one learned.
- Report the test score, even though it is lower. It is the honest one.
Why evaluate at all: to choose between models, to know how far to trust one, and to find problems before deployment rather than after.
Careful: a high training score is not good news on its own; it may only be memory. Always ask: tested on what? If the answer is "the same data it learned from", the score means nothing.
Your missions
datasets/apples.csv (with the Training and Testing sheets you made in Lesson 2.1)A model that learned
10 minin pairs- 1
Open your
applesfile with its two sheets: Training (A01–A28) and Testing (A29–A36). Unhidevarietyin Testing. - 2
In both sheets, put your best rule from Lesson 2.2 in column G, and score it with
=IF(G2=F2;1;0)in column H. - 3
Predict: will the rule score better on Training or on Testing? Write it in J1.
Only you can see this - 4
Add up both. Write each score as right out of how many.
A model that memorised
10 min- 5
Now build a cheat. In Training, column I:
=VLOOKUP(B2;$Training.$B$2:$F$29;5;0). It finds a training apple with exactly the same weight, and copies its variety. Fill down and score it. It does very well. Why? - 6
Put the same formula in Testing, column I. Fill down. What happens?
- 7
Fill in the table in J5:
Training score Testing score The model that learned The model that memorised
The sign at the exhibition
3 min- 8
In J10, rewrite the exhibition sign so that it is honest. Keep it under 15 words.
Move 4 apples from Training to Testing and score both models again. Does a bigger testing set change your trust in the scores?
No laptop today?
Your teacher writes 10 apples on the board and hides 3 of them. The class writes a rule using the 7, then tests it on the hidden 3. Then one student "memorises" the 7 aloud and tries to answer the hidden 3 from memory — and can't.
Debate it
The exhibition team were not cheating on purpose. They were proud of a real number.
- Who should have asked "tested on what?" — the team, the judges, or the visitors?
- Hiba's uncle used the app on his own trees. What harm could a wrong healthy have done?
Check yourself · practice, not a test
In the app, students answer these one at a time and each answer is checked straight away. It's practice, never a mark — anything they miss comes back later for another go.
1.Why is the testing set kept away from the model during training?
- AIt is too small to learn from
- BSo its score shows how the model does on data it has never seen
- CTesting data has no labels at all
- DModels can only read one set at a time
2.A model that scores 100% on its own training data is certain to work well on new data.
TrueFalse3.When a model remembers its training data instead of learning a pattern, it is called ______.
4.Put the train-test procedure in order:
- 1Split the labelled data into training and testing sets
- 2Compare its predictions with the true labels
- 3Train the model on the training set
- 4Ask the model to predict the testing set
5.CBSE compares model evaluation to:
- AA driving licence
- BA report card
- CA recipe
- DA map
Believe the score on data the model has never seen.
Typing practice
Skill: a lookup formula (5 min)
-
On typing.com: the symbols lessons.
-
Type three times, eyes on the screen:
=VLOOKUP(B2;$Training.$B$2:$F$29;5;0) -
A dollar sign fixes a reference so it doesn't move when you fill down. Goal this term: 38–44 WPM at 95%.
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.