How machines learn from examples
Big idea: an AI is not given rules. It learns patterns from many examples, and gets better by finding out when it is wrong.
The story in short
Mitthu the parrot saw one golden mango and made a rule: yellow means ripe. The next morning, customers complained. Some yellow mangoes were too old, and green Langra mangoes, which stay green even when ripe, were left behind. So Bunny played a game: he showed Mitthu fifty mangoes, one at a time, and said “ripe” or “raw” after each guess. Mitthu’s mistakes fell from 6 in 10 to just 1.
The idea
- Training data is the set of examples a computer learns from (the fifty mangoes).
- Labels are the right answers attached to each example (“ripe”, “raw”).
- Features are the clues it looks at: colour, smell, softness, shape.
- Feedback (“look again, what is different?”) is how it adjusts after a mistake.
- Test data is a fresh batch it has never seen, like Farooq chacha’s basket, to check it really learned.
- Confidence is how sure it is. A good AI, like a good parrot, says “I’m not sure” sometimes.
Where you see it
The plant app that says “Neem” when you point your phone at a leaf learned exactly this way, from a huge number of labelled leaf photos.
Remember: one example makes a weak rule. Many examples, plus mistakes you learn from, make a strong one.
Check yourself
Which of these is a feature an AI could use to tell ripe mangoes from raw ones?
A spam filter learns from 10,000 emails, each marked "spam" or "not spam". What are those marks called?
Mitthu stopped at a strange speckled mango and said "I am not sure". Why is that good?
More for you: 🧒 Kids · 🧑🏫 Parents and teachers