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.
Learn it
Software can be built three ways: high code (programmers write every line), low code (visual tools plus some code) and no code (drag, drop and connect blocks). No-code AI lets a farmer, a doctor or a teacher build a model without programming. A decision tree built this way is one of the few models whose learned rules you can read aloud, which makes it easier to check, and harder to blindly trust.
Words to know
- High code every line written by hand, in a language like Python. Fully flexible, slow and expensive.
- Low code visual tools with a little hand-written code.
- No code no coding at all: drag, drop, connect.
- Orange Data Mining a no-code tool CBSE names. A model is a chain of widgets: File → Tree → Tree Viewer → Predictions.
- Decision tree a model that learns a chain of questions from labelled data. It is supervised, learning-based classification.
- Target the column the model must predict. Meta — a column to ignore, like a name tag.
- Automation bias trusting a machine's answer over your own correct judgment.
Step by step: reading a tree the machine learned
From labelled walnut data, a tree learns:
weight ≤ 11 g? → yes: grade C
→ no: shell cracked? → yes: grade B
→ no: grade A
- Read it as sentences: light walnuts are grade C; heavier ones are grade B if cracked, otherwise A.
- Notice who wrote it: nobody. The tool found these questions from the examples.
- Use it on a new walnut: 13 g, not cracked → A.
- Check the edge cases: a walnut of exactly 11 g goes to C. A grader might disagree, and should say so.
- Score it honestly on walnuts it has never seen (Unit 3 shows how).
CBSE's three disadvantages of no-code AI: less flexibility (you can only do what the blocks allow), automation bias, and data security (the tool may not keep data safe, so never load personal data into one).
Careful: no-code does not mean no thinking. Choosing the target, the features and how deep the tree may grow are all decisions a person makes. And a tree's score on the walnuts it learned from is not its real score; Unit 3 shows how to find that.
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.
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.
Typing practice
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%.