Class 8 · Unit 4: Data and fairness · Lesson 4.3 · 40 min
Fixing what we can
“So we send them more Ambri photos. Problem solved.” “Maybe. Let's find out.”
Today you will: Plan what to change in a dataset — and what you can't · Train lopsided, then balanced · Test both on the same photos, honestly
Story
Hiba has the audit from last week on the screen: Delicious 214, Ambri 9.
Bilal: “So we send them more Ambri photos. Problem solved.”
Hiba: “Maybe. Let's find out. We'll train one model on the lopsided set, write down exactly how sure it is, then balance the photos and train it again.”
They do. The second model gets Ambri right far more often.
Then Bilal tries a photo he took at dusk, in the rain, from two metres away. Both models fail. He looks at Hiba.
Hiba: “That one isn't a data problem. That's a photo nobody could read.”
Watch
Re-curate, retrain, compare — — scan code 8.4.3 in the printed book.
Warm up your fingers
Skill: editing without the mouse (Term 2 focus, 6 min)
- On typing.com, do one paragraph or editing-practice lesson.
- Then practise in Writer: type a sentence, and use Ctrl+Z, Ctrl+Y, Home, End and Shift+arrow to fix it — no mouse. You will need these when you write your project report.
On the laptop
You need: Teachable Machine (no account) · LibreOffice Calc · leaf-photos/train-lopsided/ (30 Delicious, 6 Ambri) · leaf-photos/extra-ambri/ (24 more) · leaf-photos/test-12/ · confidence-log.ods
Part A: Plan on paper first (5 min, in pairs)
Mission 1: Your mission
- ☐1
Three columns: What's wrong · What we'll change · What we can't change. At least two rows each — "no photos at all from Gurez" may belong in the third.
Part B: The lopsided model (6 min)
- ☐2
Classes Delicious and Ambri; upload
train-lopsided/(30 and 6). Train. - ☐3
Test all 12
test-12/photos. Record true variety · what it said · confidence %. Part C: Re-curate and retrain (8 min)
- ☐4
Predict: how many more will it get right after balancing? Add the 24
extra-ambri/photos so both classes have 30. Retrain. - ☐5
Test the same 12, in the same order. Count right answers for each model:
=COUNTIF(D2:D13;"right"). Part D: The honest paragraph (3 min)
- ☐6
"Balancing changed the score from ___ to ___." · "The photo it still gets wrong is ___, because ___." · "One thing more data couldn't fix is ___."
No laptop today?
Your teacher runs one model at the front while everyone records the same table. Parts A and D need no device — and they're what's assessed.
Now you know
- Re-curating means changing the dataset itself: add examples of the thin class, remove wrong or duplicate ones, keep classes balanced.
- A confidence score is how sure the model is. Right at 51% is a warning, not a success.
- Test on the same photos before and after, or the comparison means nothing.
- Balancing usually helps — it's not a cure. Some failures come from the photo, some from groups nobody collected, some from questions it should never be asked.
- Report honestly: what improved, by how much, and what's still broken.
Debate it
Two months later, the leaf app works well on Delicious and Ambri — because the class sent photos. Nobody has ever sent a photo of an old Maharaji tree, and the app confidently calls every Maharaji leaf "Delicious".
Should the app say "I don't know"? Who decides when a model is allowed to admit that it cannot tell?
Check yourself — practice, not a test
1. CBSE's word for going back and changing what is in the dataset is to ______ it.
2. The model answers "Ambri" with a confidence score of 51%. The best reading of that is:
- ○ It is certain, because it chose Ambri
- ○ It is barely choosing between two answers, so treat it as unreliable
- ○ It is 51% accurate overall
- ○ The photo is 51% Ambri and 49% Delicious
3. To compare two models fairly, you must test them on the same photos.
- ○ True
- ○ False
4. Which problems can adding more good data realistically fix? (choose all that apply)
- ○ A class with only 6 examples while another has 30
- ○ A model that has never seen a leaf photographed in shade
- ○ A photo so blurred that a person cannot identify it either
- ○ A variety grown in one district that the dataset ignores
5. Put the fairness fix in order:
- 1. Plan what to add, remove or correct
- 2. Audit the dataset and find the gap
- 3. Test on the same photos and compare the confidence scores
- 4. Re-curate the dataset
- 5. Retrain the model
Remember
Balancing the data fixes a thin class, not a blurred photo. Say which one you fixed.