Class 10 · Unit 2: Modelling · Lesson 2.5 · 40 min
No-code AI: a model from statistical data
The machine wrote its own rules for sorting apples. Can you read them — and should you trust them?
Today you will: Build a model without writing code · Read the rules the machine learned · Spot automation bias
Story
The fruit cooperative has a new tablet at the sorting table. You type in an apple's weight and colour, and the screen says which variety it is.
Hiba's uncle holds up a tall, sweet apple. The screen says Delicious.
He frowns. He turns the apple once in his hand. Then he looks at the screen again, and drops it in the Delicious crate.
Hiba: “You didn't think it was Delicious.”
Uncle: “The machine said so.”
Hiba: “Forty years, and you believed the tablet over your own hands?”
He doesn't answer. He picks up the next apple.
Watch
Building AI without code — — scan code 10.2.5 in the printed book.
Warm up your fingers
Skill: numbers and decimals in rows (5 min)
-
On typing.com: the numbers lessons.
-
Type three times, eyes on the screen:
N4,193,70,13.4,1.04 -
Goal this term: 38–44 WPM at 95%.
On the laptop
You need: Orange Data Mining · datasets/apples.csv · datasets/new-apples.csv
Mission 1: Load the data (6 min, in pairs)
- ☐1
Open Orange. Drag a File widget onto the canvas and open
apples.csv. - ☐2
In the File widget, set
varietyto target andappleto meta, so Orange knows what to predict and what to ignore. - ☐3
Connect a Data Table and check all 36 apples are there.
Mission 2: Let the machine find the rules (10 min)
- ☐4
Predict: which feature will the tree ask about first? Write it on paper.
- ☐5
Connect File → Tree. In Tree, tick Limit the maximal tree depth and set it to 2.
- ☐6
Connect Tree → Tree Viewer. Read the rules out loud, as sentences. Was your prediction right?
Mission 3: Score it, then use it (8 min)
- ☐7
Connect File and Tree to Test and Score. Write down the CA (classification accuracy). Unit 3 explains exactly how it was measured.
- ☐8
Add a second File widget with
new-apples.csv. Connect it and the Tree to Predictions. Write down what it says for N1–N4. - ☐9
Look hard at N4: sweet, tall, and only just over 190 g. Do you agree with the machine?
Finished early?
Set the maximal depth to 5 and look at the tree again. Is a bigger tree better, or has it started remembering individual apples?
No laptop today?
Your teacher draws the tree from the Learn section on the board, without its numbers. Pairs guess the cut-offs, then test their guesses on ten apples read aloud. Then apply the real tree to N1–N4 and argue about N4.
No Orange on your laptop? Use Calc: the tree is one formula —
=IF(B2<=190;"Ambri";IF(C2<=69;"Maharaji";"Delicious")). Score it the way you did in Lesson 2.2.
Now you know
- High code, low code, no code. High code is written by hand; no code is built by dragging and connecting blocks. No-code AI lets anyone build a model.
- The machine wrote the rules. A decision tree learns its questions from labelled data — a learning-based, supervised, classification model.
- You can read this one. A decision tree is one of the few models whose rules you can say aloud. A neural network's weights cannot be read like this.
- Automation bias: trusting a machine's answer over your own good judgment. The uncle had it.
- Other risks: you can only do what the tool allows, and the tool may not keep data safe — never put personal data into one.
Debate it
The cooperative is thinking of letting the tablet grade every apple, with no one checking.
- What would you want to know about the model before you agreed? (Unit 3 will give you the words.)
- How could the cooperative use the tablet and keep the uncle's judgment?
Check yourself — practice, not a test
1. Match each to its approach:
Programmers write every line in Python · Drag-and-drop blocks, plus a little hand-written code · Drag-and-drop blocks, no coding at all
Match with: Low code · High code · No code2. Trusting a machine's answer over your own correct judgment is called:
- ○ Overfitting
- ○ Automation bias
- ○ Association
- ○ Reinforcement
3. A decision tree learned from labelled apples is a supervised learning model.
- ○ True
- ○ False
4. In the apple tree, the first question is about ______.
5. Which are disadvantages of no-code AI that CBSE names? (choose all that apply)
- ○ Less flexibility
- ○ Automation bias
- ○ Security of data
- ○ It always needs a programmer
Remember
A machine can write the rules. You still decide whether to trust them.