Training the model
120 photos, all labelled. “Train it on all of them,” says Rahat. “Then how will we ever know if it works?” says Hiba.
- Train a three-class model
- Read its confidence scores
- Keep a test set locked away
Training the model
120 photos, all labelled. “Train it on all of them,” says Rahat. “Then how will we ever know if it works?” says Hiba.
- Train a three-class model
- Read its confidence scores
- Keep a test set locked away
Story
She takes twenty photos out of the folder and puts them in a second folder marked test.
Learn it
Stage 3 is training: building the model, the part of an AI project that does the deciding. Think of it this way: the training data is the textbook, the model is the student, and the labels are the answers at the back. The student reads many worked examples and finds the pattern itself. Nobody hands it a rule, and that is exactly what makes it AI. And before any training starts, some examples are locked away for testing.
Words to know
the part of an AI project that learns the pattern and makes the decision. CBSE calls it the brain of the project.
showing the model labelled examples until it learns the pattern.
data where every example carries its correct answer, like a photo marked wet.
one of the groups the model chooses between: wet, dry, hazardous.
how sure the model says it is, as a percentage. High confidence is not proof.
examples held back before training, used later to check the model honestly.
Step by step: a written rule vs a learned rule
- A written rule (Class 6):
=IF(A1="red circle","apple","???"). A person decided the rule, and anything unexpected gets "???". - A learned rule: show the model 30 labelled photos of each class. It finds its own pattern of shapes, colours and textures, one no human could write out.
- Before training, lock some away: of 120 photos, put 20 in a test folder and do not open it.
- Train on the other 100, then try new items and read the confidence: "Dry 94%" is sure; "Wet 48%, Dry 45%" means it is nearly guessing.
The real magic is data. The same tool, trained on better examples, becomes a better model. The tool is not the clever part.
Careful: the model is not the program. The same tool, given different photos, trains a different model. And more classes do not make a better model: three well-separated classes with good examples beat six blurred ones.
Your missions
waste/train/ (about 30 photos per class) · waste/test/ (20 photos — not opened today)Three classes
8 minin pairs- 1
teachablemachine.withgoogle.com → Image Project → Standard. Don't sign in.
- 2
Name the classes Wet, Dry, Hazardous, and upload the matching
waste/train/photos. - 3
How many examples does each class have? Note it — you'll need it in Unit 4.
Train and watch
10 min- 4
Train Model — it trains on this laptop.
- 5
Predict: which item from the classroom bin will it be least sure about? Hold up items to the webcam, or upload spare photos.
Only you can see this - 6
In Calc, record five items: what it was · what the model said · its top confidence. Note one above 90% and one where the top two were close.
Leave the test folder alone
2 min- 7
Keep the tab open or export the model for Lesson 1.4.
No laptop today?
Play the student and the textbook: the class sorts twenty picture cards into wet, dry and hazardous; a volunteer studies them for two minutes, then sorts five new cards. Ask what rule they used — that sentence is the model.
Debate it
Another group trains its model on photos taken in bright sunlight, each item placed on a clean white sheet, all photographed on the same afternoon.
- What will happen when the model is shown a wrapper lying in the shade of the bin, at dusk?
- What does that tell you about where training photos should be taken?
- The group's model scores very well in the classroom. Is it a good model? What would you need to know before answering?
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.In an AI project, the model is:
- AThe laptop the project runs on
- BThe part that learns the pattern and makes the decision
- CThe folder of photographs
- DThe person who labels the data
2.In machine learning, a programmer writes the rule the model follows.
TrueFalse3.Data that carries the correct answer with each example is called ______ data.
4.Why must some examples be kept out of training?
- ATo save space on the laptop
- BTo make training faster
- CSo the model can later be tested on examples it has never seen
- DBecause the tool only accepts 30 photos
5.Match each part of the analogy to what it stands for:
- The textbook
- The student
- The answers at the back
- The training data
- The labels
- The model
The model is learned from examples, not written as rules. Keep some examples back.
Typing practice
Skill: capitals without looking — the shift key with both hands (6 min)
- On typing.com, open the Intermediate lessons covering capital letters and shift . Use the shift key on the opposite hand to the letter.
- Then type these class names three times, exactly as they are spelt:
Wet Waste · Dry Waste · Hazardous Waste - Term 1 goal: 28–32 words per minute at 93% accuracy.
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.