The child who knows a ripe mango
A child sitting at a fruit cart picks the ripe mango out of the pile, every single time. Ask him how and he cannot say. He learned from seeing heaps of mangoes, not from a rule. A machine learns from examples too. But how? Think you know? Stay anyway.
हिन्दी में पढ़ें
ठेले पे बैठा एक बच्चा, आमों के ढेर में से हर बार पका आम ही उठाता है। पूछिए कैसे, तो बता नहीं पाता। उसने नियम नहीं, ढेरों आम देखकर सीखा है। मशीन भी उदाहरणों से सीखती है। पर कैसे? लगता है पता है? तब भी रुकिए।
Today you will teach a machine yourself, and then beat it on purpose. By the end you will be able to explain how a machine learns from examples, and where it slips.
हिन्दी में पढ़ें
आज आप खुद एक मशीन को सिखाएँगे, और फिर जानबूझकर उसे हराएँगे। अंत तक आप बता पाएँगे कि उदाहरणों से मशीन सीखती कैसे है, और कहाँ चूकती है।
Did someone put the answers in?
I am BSK, and I build products with AI. Where every fact comes from will be on screen. Many people believe that someone filled the AI with all its answers in advance. It sounds right. For a calculator it is even true: every step inside it was written by a person.
हिन्दी में पढ़ें
मैं बी एस के, ए आई से प्रोडक्ट्स बनाता हूँ। हर बात कहाँ से ली, स्क्रीन पे दिखेगा। बहुत लोग मानते हैं: ए आई के अंदर किसी ने सारे जवाब पहले से भर दिए हैं। सुनने में ठीक लगता है। कैलकुलेटर के लिए ये सच भी है: उसके अंदर का हर स्टेप किसी इंसान ने लिखा है।
Now try writing down the child's rule. Ripe means what colour, what smell, how soft? If the child himself cannot put it into words, how would anyone write it into a machine? There is old proof too. More than sixty years ago, an engineer built a machine that plays checkers, a board game a bit like chess.
हिन्दी में पढ़ें
अब उस बच्चे वाला नियम लिखकर देखिए। पका आम मतलब कैसा रंग, कैसी खुशबू, कितना नरम? जो बात वो बच्चा खुद नहीं बता पाता, उसे कोई लिखकर मशीन में कैसे भरेगा? एक पुराना सबूत भी है। साठ से ज़्यादा साल पहले, एक इंजीनियर ने चेकर्स खेलने वाली एक मशीन बनाई। चेकर्स, यानी शतरंज जैसा एक खेल।
What do you think: could that machine play better than the man who made it? His report says yes. In eight or ten hours of play, it learned to play better than the man who made it. How could he fill in moves he did not know himself? He did not. The machine learned mostly by playing against itself.
हिन्दी में पढ़ें
आपको क्या लगता है, वो मशीन अपने बनाने वाले से अच्छा खेल पाई? उसकी रिपोर्ट कहती है, हाँ। आठ-दस घंटे के खेल में, उसने अपने बनाने वाले से बेहतर खेलना सीख लिया। जो चालें उसे खुद नहीं पता थीं, वो उसने भरीं कैसे? नहीं भरीं। मशीन ने ज़्यादातर खुद से खेल-खेलकर सीखा।
Today's way is a little different. The machine is shown examples along with the right answer, like that child. Think of it like this: getting ready for an exam. First months of practice, then the exam. Practice means old papers with the answers printed at the back. The exam brings new questions, and no answers anywhere.
हिन्दी में पढ़ें
आज का तरीक़ा थोड़ा अलग है। मशीन को उदाहरण दिखाते हैं, साथ में सही जवाब, उस बच्चे की तरह। ऐसे सोचिए: एग्ज़ाम की तैयारी। पहले महीनों की प्रैक्टिस, फिर एग्ज़ाम। प्रैक्टिस में पुराने पेपर होते हैं, जिनके पीछे जवाब छपे हैं। एग्ज़ाम में नए सवाल, और जवाब कहीं नहीं।
So, three parts: what happens in practice, what remains after it, and what happens in the exam.
हिन्दी में पढ़ें
तो तीन हिस्से: प्रैक्टिस में क्या होता है, उसके बाद क्या बचता है, और एग्ज़ाम में क्या होता है।
Training: practice with the answers
Two things first. One: today's AI is mostly not a written recipe but a cook who learned by tasting. Two: learning from data and experience, instead of from written rules, is called machine learning. Both come from two earlier episodes: why a calculator is not AI, and whether AI and machine learning are the same. Today we open up how the learning happens.
हिन्दी में पढ़ें
दो बातें पहले। एक: आज का ए आई ज़्यादातर लिखी रेसिपी नहीं, चख-चखकर सीखा रसोइया है। दो: नियम लिखने की जगह, डेटा और अनुभव से सीखने को कहते हैं मशीन लर्निंग। ये दोनों पहले के दो एपिसोड्स में हैं: कैलकुलेटर ए आई क्यों नहीं, और ए आई और मशीन लर्निंग एक ही हैं क्या। आज खोलते हैं कि सीखना होता कैसे है।
So practice begins. Say we want to teach a machine to look at a photo of a mango and say: ripe or unripe. Real researchers have tried something like this. Their result comes near the end. The first need: photos, and on every photo its right answer. A person who knows mangoes writes that answer.
हिन्दी में पढ़ें
तो प्रैक्टिस शुरू। मान लीजिए, एक मशीन को आम की फ़ोटो देखकर बताना सिखाना है: पका या कच्चा। असली रिसर्चर्स ने ऐसी कोशिश की भी है। उसका नतीजा आख़िर में। पहली ज़रूरत: फ़ोटो, और हर फ़ोटो पे उसका सही जवाब। ये जवाब लिखता है कोई इंसान, जो आम पहचानता है।
Lots of photos, each with its right answer. That is the machine's practice book, with the answers printed at the back. Teaching a machine by showing it examples like these is called training. So the first part of learning: lots of examples. But how many? What do you think, a hundred? A thousand?
हिन्दी में पढ़ें
बहुत सारी फ़ोटो, हर एक पे सही जवाब। यही मशीन की प्रैक्टिस की किताब है, पीछे जवाब छपे हुए। ऐसे उदाहरण दिखाकर मशीन को सिखाने को कहते हैं ट्रेनिंग। तो सीखने का पहला हिस्सा: बहुत सारे उदाहरण। पर कितने? आपको क्या लगता है, सौ? हज़ार?
A famous photo-recognising machine from twenty twelve learned from about one point two million photos. What does that mean? Look at one photo every second and it takes about two weeks, nonstop, without sleep. And that machine saw each photo not once, but about ninety times. That was its practice: the same papers, again and again.
हिन्दी में पढ़ें
दो हज़ार बारह की एक मशहूर फ़ोटो पहचानने वाली मशीन ने, करीब बारह लाख फ़ोटो से सीखा था। बारह लाख का मतलब? आप हर सेकंड एक फ़ोटो देखें, तो करीब दो हफ़्ते लगातार, बिना सोए। और उस मशीन ने हर फ़ोटो एक बार नहीं, करीब नब्बे बार देखी। उसकी प्रैक्टिस यही थी: वही पेपर, बार-बार।
But each time it looks, what actually changes inside the machine?
हिन्दी में पढ़ें
पर हर बार देखने पे, मशीन के अंदर बदलता क्या है?
How a machine corrects its mistakes
What do you do in practice? You solve a question, check the answer at the back, and correct yourself a little where you went wrong. The machine does the same. But it has no mind, only numbers. A great many numbers. Think of these numbers as the knobs on a wedding DJ's mixing board, the little dials you turn.
हिन्दी में पढ़ें
प्रैक्टिस में आप क्या करते हैं? सवाल हल करते हैं, पीछे जवाब मिलाते हैं, और गलती पे थोड़ा सुधारते हैं। मशीन भी यही करती है। पर उसके पास दिमाग़ नहीं, नंबर हैं। बहुत सारे नंबर। इन नंबरों को शादी वाले डी जे के मिक्सिंग बोर्ड के नॉब समझिए, यानी घुमाने वाली घुंडियाँ।
But here there is no DJ, and no single knob means 'yellow' or 'soft'. Together they make the answer. At the start these knobs are usually set anywhere at all. So on the first photo the machine's answer is just a guess. Its answer is a score: how ripe the mango looks, out of a hundred. It gave a ripe mango only thirty. Wrong.
हिन्दी में पढ़ें
पर यहाँ कोई डी जे नहीं है, और कोई एक नॉब 'पीला' या 'नरम' नहीं है। सब मिलकर जवाब बनाते हैं। शुरू में ये नॉब अक्सर कहीं भी, उल्टे-सीधे घुमाए होते हैं। तो पहली फ़ोटो पे मशीन का जवाब, बस एक तुक्का। उसका जवाब एक अंक होता है: आम सौ में से कितना पका लगता है। उसने पके आम को बस तीस दिए। गलत।
So what changes inside? Will a person come and write a new rule? Or will the knobs turn a little? Think. The knobs turn. The right answer was a hundred. The knobs turn a little in whichever direction makes that gap smaller. Who turns them? A training program that people wrote. But no person chooses how far each knob turns.
हिन्दी में पढ़ें
अब अंदर क्या बदलेगा? कोई इंसान आकर नया नियम लिखेगा? या नॉब थोड़े घूमेंगे? सोचिए। नॉब घूमेंगे। सही जवाब सौ था। नॉब उस तरफ़ थोड़ा घूमते हैं, जिससे ये फ़र्क़ घटे। घुमाता कौन है? लोगों का लिखा एक ट्रेनिंग प्रोग्राम। पर कौन सा नॉब कितना घूमे, ये कोई इंसान नहीं चुनता।
And it usually happens not after every photo but after a small bundle of them. Check the answers, turn the knobs, then the next bundle. For now, take this much as given. How far and which way each knob turns is decided by a method from maths, which comes later in the course. So this is how a machine learns: a guess, a check against the answer, a small turn of the knobs, and again. Nobody wrote 'yellow means ripe'.
हिन्दी में पढ़ें
और ये अक्सर हर फ़ोटो के बाद नहीं, फ़ोटो की एक छोटी गड्डी के बाद होता है। जवाब मिलाए, नॉब घुमाए, फिर अगली गड्डी। अभी के लिए इतना मान लीजिए। कौन सा नॉब कितना और किस तरफ़ घूमे, ये गणित का एक तरीक़ा तय करता है। वो कोर्स में आगे आएगा। तो मशीन ऐसे सीखती है: अंदाज़ा, जवाब मिलाना, नॉब थोड़ा घुमाना, और फिर दोहराना। किसी ने 'पीला मतलब पका' नहीं लिखा।
What a model is
Now practice is over. After months of it, what do you keep? The old papers went out with the scrap. What remains is whatever settled in through practice. The machine does not hold on to the photos either. It keeps the knobs, each set in its place. The set numbers that remain after training are what is called the model.
हिन्दी में पढ़ें
अब प्रैक्टिस ख़त्म। महीनों बाद आपके पास क्या बचता है? पुराने पेपर तो रद्दी में गए। बचता है वो, जो प्रैक्टिस से अंदर बैठ गया। मशीन के पास भी फ़ोटो नहीं रहतीं। रहते हैं नॉब, अपनी-अपनी जगह पे सेट। ट्रेनिंग के बाद जो सेट किए हुए नंबर बचते हैं, बस उसी को कहते हैं मॉडल।
So the model holds no stored photo of a mango, and no rule a person wrote. Only numbers. How many numbers? The model of that twenty twelve machine had about sixty million. Sixty million knobs, and every one of them set by training, not by a person.
हिन्दी में पढ़ें
यानी मॉडल में आम की कोई फ़ोटो नहीं रखी, किसी इंसान का लिखा नियम भी नहीं। सिर्फ़ नंबर। कितने नंबर? उस दो हज़ार बारह वाली मशीन के मॉडल में, करीब छह करोड़। छह करोड़ नॉब, और हर एक की जगह ट्रेनिंग ने तय की, किसी इंसान ने नहीं।
A big tech company's own guide puts the difference the same way: a person writes an ordinary program, while a model learns its own numbers. So 'someone filled in the answers' breaks right here. Nobody did. Each answer is made from these numbers. What sits in those numbers is a pattern: whatever tells a photo of a ripe mango apart from a photo of an unripe one.
हिन्दी में पढ़ें
एक बड़ी टेक कंपनी की अपनी गाइड यही फ़र्क़ लिखती है: साधारण प्रोग्राम इंसान लिखता है, मॉडल अपने नंबर खुद सीखता है। तो 'किसी ने अंदर जवाब भरे' वाली बात यहीं टूटती है। किसी ने नहीं भरे। जवाब हर बार इन नंबरों से बनता है। उन नंबरों में बैठा है एक पैटर्न: कौन सी बात पके आम की फ़ोटो को कच्चे की फ़ोटो से अलग करती है।
So you have half the answer: a machine learns by changing its numbers, and what remains is the model. A question for you. There is not a single mango photo in the model. So how will it judge a new mango?
हिन्दी में पढ़ें
तो आधा जवाब आ गया: मशीन अपने नंबर बदलकर सीखती है, और जो बचता है, वो मॉडल है। एक सवाल आपसे। मॉडल में आम की एक भी फ़ोटो नहीं है। तो वो एक नया आम पहचानेगा कैसे?
Inference: the exam
With those same numbers. The new photo goes in, passes through all the numbers, and out comes a score: how ripe. This is the exam. The question is new, there is no answer at the back, and the model has to rely on its practice. Running a model that has finished learning on a new case is called inference.
हिन्दी में पढ़ें
उन्हीं नंबरों से। नई फ़ोटो अंदर जाती है, सारे नंबरों से होकर गुज़रती है, और बाहर आता है अंक: कितना पका। ये एग्ज़ाम है। सवाल नया है, पीछे कोई जवाब नहीं छपा, और मॉडल को अपनी प्रैक्टिस के भरोसे बोलना है। सीख चुके मॉडल को किसी नए केस पे चलाने को कहते हैं इनफ़रेंस।
And this answer was not looked up anywhere. It is a prediction, made by those numbers. Training comes first, as one big job. Inference comes after, every time someone uses the model. And when you ask a chatbot, an AI you talk to by typing, something, the same thing is happening there: inference.
हिन्दी में पढ़ें
और ये जवाब कहीं से ढूँढकर नहीं निकला। ये एक अनुमान है, जो उन नंबरों ने लगाया। ट्रेनिंग पहले, एक बड़ा काम। इनफ़रेंस बाद में, हर बार जब कोई मॉडल इस्तेमाल करता है। और जब आप चैटबॉट से, यानी लिखकर बात करने वाले ए आई से, कुछ पूछते हैं, तो उधर भी यही होता है: इनफ़रेंस।
Mostly, its numbers do not change while it answers. It is sitting the exam, not practising. In the exam a model can only write what its practice taught it. And that is where a danger hides.
हिन्दी में पढ़ें
ज़्यादातर, जवाब देते वक़्त उसके नंबर नहीं बदलते। वो एग्ज़ाम दे रहा है, प्रैक्टिस नहीं कर रहा। एग्ज़ाम में मॉडल वही लिख सकता है, जो प्रैक्टिस ने उसे सिखाया। और यहीं एक ख़तरा छिपा है।
It learns what the examples show
The danger is this: a model learns everything in its examples. Even what should not matter. Suppose every photo of a ripe mango was taken in a blue basket, and every unripe one on the floor. What will the model have learned? The ripe mango, or the blue basket?
हिन्दी में पढ़ें
ख़तरा ये है: मॉडल उदाहरणों में जो कुछ है, सब सीखता है। वो भी, जो मायने नहीं रखना चाहिए। मान लीजिए, पके आमों की सारी फ़ोटो एक नीली टोकरी में खींची गईं, और कच्चे आमों की, ज़मीन पे। मॉडल ने क्या सीखा होगा? पका आम, या नीली टोकरी?
Possibly the basket. Because the easiest mark that told the two piles apart was that blue colour. This is not just a story. Some researchers trained and tested a model that spots pneumonia in chest X-rays. Then they checked one more thing: can you tell from the X-ray alone which hospital it came from?
हिन्दी में पढ़ें
हो सकता है टोकरी। क्योंकि दोनों ढेरों को अलग करने का सबसे आसान निशान, वो नीला रंग था। ये सिर्फ़ कहानी नहीं है। कुछ रिसर्चर्स ने छाती के एक्स-रे से निमोनिया पहचानने वाला मॉडल सिखाया और परखा। फिर उन्होंने एक और बात परखी: क्या एक्स-रे देखकर ही पता चल जाता है कि वो किस अस्पताल का है?
A model trained to do that turned out right almost every time. And at one hospital, the share of pneumonia patients was far higher than at the others. So recognising the hospital could become a shortcut to the answer. Just like that blue basket.
हिन्दी में पढ़ें
इसके लिए सिखाया गया एक मॉडल, लगभग हर बार सही निकला। और एक अस्पताल में निमोनिया वाले मरीज़ों का हिस्सा, बाक़ियों से कहीं ज़्यादा था। तो अस्पताल पहचानना, जवाब तक पहुँचने का शॉर्टकट बन सकता था। बिल्कुल उस नीली टोकरी जैसा।
And on X-rays from other hospitals? In more than half of the comparisons, the pneumonia model did clearly worse. The examples a model learns from are called training data. Data just means a pile of information; here, photos and their answers. The CBSE handbook for the class ten AI course says the same: training data has to be relevant and authentic.
हिन्दी में पढ़ें
और दूसरे अस्पतालों के एक्स-रे पे? आधी से ज़्यादा तुलनाओं में, निमोनिया वाला मॉडल साफ़ कमज़ोर निकला। जिन उदाहरणों से मॉडल सीखता है, उन्हें कहते हैं ट्रेनिंग डेटा। डेटा, यानी जानकारी का ढेर, यहाँ फ़ोटो और उनके जवाब। सी बी एस ई की दसवीं की ए आई हैंडबुक भी यही कहती है: ट्रेनिंग डेटा काम का और सच्चा होना चाहिए।
Crooked examples make a crooked model.
हिन्दी में पढ़ें
उदाहरण टेढ़े, तो मॉडल टेढ़ा।
Does the model know mangoes?
Now the honest part: the model does not know mangoes. It only knows the pattern in those photos. Change the light, change what is behind the fruit, change the variety, and it can fail. Models that learned from wildlife camera photos did very well at the places they learned from, and poorly at new places.
हिन्दी में पढ़ें
अब एक ईमानदार बात: मॉडल आम को नहीं जानता। वो सिर्फ़ उन फ़ोटो का पैटर्न जानता है। रोशनी बदलिए, पीछे का नज़ारा बदलिए, आम की किस्म बदलिए, और वो चूक सकता है। जानवरों पे नज़र रखने वाले कैमरों की फ़ोटो से सीखे मॉडल, पुरानी जगहों पे बढ़िया थे, नई जगहों पे कमज़ोर।
I found no test like that on mangoes. So for mangoes I will only say: it can fail. And the child's job? Researchers in West Bengal tried to sort picked mangoes with a camera, by how mature each one was. Using several varieties from several places, it was right up to about ninety six percent of the time on average in their tests.
हिन्दी में पढ़ें
आम पे ऐसा टेस्ट मुझे नहीं मिला। इसलिए आम के लिए मैं बस इतना कहूँगा: चूक सकता है। और वो बच्चे वाला काम? पश्चिम बंगाल के रिसर्चर्स ने कैमरे से तोड़े हुए आमों को छाँटने की कोशिश की, कि कौन कितना तैयार है। कई किस्मों और कई जगहों के आम लेकर, अपनी जाँच में औसतन करीब छियानवे परसेंट तक सही।
But that was their own test, not a market cart. And the job is close to the child's, not quite the same.
हिन्दी में पढ़ें
पर ये उनकी अपनी जाँच थी, बाज़ार का ठेला नहीं। और काम बच्चे जैसा है, बिल्कुल वही नहीं।
Train your own model, then fool it
Teach a machine yourself, then beat it. Right now, free, with no coding. There is a free website; its address is on screen and in the description below. No account, no login. It is made for a laptop's camera. On a phone the page opens too, in the browser, the app you open websites in.
हिन्दी में पढ़ें
एक मशीन खुद सिखाइए, फिर उसे हराइए। अभी, मुफ़्त में, बिना कोडिंग के। एक मुफ़्त वेबसाइट है, उसका पता स्क्रीन पे और नीचे डिस्क्रिप्शन में है। न अकाउंट चाहिए, न लॉग इन। ये लैपटॉप के कैमरे के लिए बना है। फ़ोन के ब्राउज़र में भी, यानी जिस ऐप में आप वेबसाइट खोलते हैं, ये पेज खुलता है।
But whether it fully works on a phone, I cannot say for sure. If it does not, use a laptop. Get Started, Image Project, Standard image model. Then three boxes, which the screen calls classes: spoon, cup, empty table. No mangoes? Any three things will do.
हिन्दी में पढ़ें
पर फ़ोन पे पूरा चलेगा या नहीं, ये मैं पक्का नहीं कह सकता। न चले, तो लैपटॉप पे कीजिए। गेट स्टार्टेड, इमेज प्रोजेक्ट, स्टैंडर्ड इमेज मॉडल। फिर तीन डिब्बे, जिन्हें स्क्रीन क्लास कहती है: चम्मच, कप, ख़ाली मेज़। आम न हों, तो कोई भी तीन चीज़ें चलेंगी।
In each box take a few dozen photos with the camera. Then press Train Model. That is its practice. Now the exam: hold the spoon up to the camera, and see what the model says. Now beat it on purpose. Make the light very dim, change the room, or show it a photo of the spoon on another phone.
हिन्दी में पढ़ें
हर डिब्बे में कैमरे से कुछ दर्जन फ़ोटो खींचिए। फिर ट्रेन मॉडल दबाइए। ये उसकी प्रैक्टिस है। अब एग्ज़ाम: चम्मच कैमरे के सामने लाइए, और देखिए मॉडल क्या कहता है। अब जानबूझकर हराइए। रोशनी बहुत कम कीजिए, कमरा बदलिए, या किसी दूसरे फ़ोन पे चम्मच की फ़ोटो दिखाइए।
Where it slips, you will see what it really learned: the spoon, or the light in your kitchen. How, with so few photos? Because the tool starts from a model that has already learned. You only teach its last part. And your photos? In the makers' own words, training happens inside your browser. Unless you choose to save it, nothing leaves.
हिन्दी में पढ़ें
जहाँ वो चूका, वहीं आपको दिख जाएगा कि उसने असल में क्या सीखा था: चम्मच, या आपकी रसोई की रोशनी। इतनी कम फ़ोटो से कैसे? क्योंकि ये टूल पहले से सीखे हुए एक मॉडल से शुरू करता है। आप बस उसका आख़िरी हिस्सा सिखाते हैं। और आपकी फ़ोटो? बनाने वालों के अपने शब्दों में, ट्रेनिंग आपके ब्राउज़र में होती है। जब तक आप खुद सेव न करें, कुछ बाहर नहीं जाता।
How a machine learns
And that child at the fruit cart? The machine took his road too: not a rule, but heaps of examples. So how does a machine learn from examples? By seeing examples with the right answers, and turning its numbers a little after every check. What remains is the model.
हिन्दी में पढ़ें
और वो ठेले वाला बच्चा? मशीन ने भी उसी का रास्ता लिया: नियम नहीं, ढेरों उदाहरण। तो उदाहरणों से मशीन सीखती कैसे है? सही जवाब वाले उदाहरण देखकर, हर जाँच के बाद अपने नंबर थोड़ा-थोड़ा घुमाकर। और जो बचता है, वही मॉडल है।
If every ripe mango photo is taken in yellow evening light, what will the model learn? Write it in the comments. The next question: since this morning, how many times have you used AI without knowing it? The next episode is on that question. For the whole course in order, subscribe to BooleanIQ.
हिन्दी में पढ़ें
पके आमों की सारी फ़ोटो शाम की पीली रोशनी में हों, तो मॉडल क्या सीखेगा? कमेंट में लिखिए। अगला सवाल: आज सुबह से अब तक, आप बिना जाने कितनी बार ए आई इस्तेमाल कर चुके हैं? अगला एपिसोड इसी सवाल पे है। पूरा कोर्स क्रम से चाहिए, तो बूलियन आईक्यू को सब्सक्राइब कीजिए।
Ideas to keep
- Machine learning
- Two: learning from data and experience, instead of from written rules, is called machine learning.
- Training
- Teaching a machine by showing it examples like these is called training.
- Model
- The set numbers that remain after training are what is called the model.
- Inference
- Running a model that has finished learning on a new case is called inference.
- Training data
- The examples a model learns from are called training data. Data just means a pile of information; here, photos and their answers.
THE WORKED CASE
Follow the example
So practice begins. Say we want to teach a machine to look at a photo of a mango and say: ripe or unripe. Real researchers have tried something like this. Their result comes near the end. The first need: photos, and on every photo its right answer. A person who knows mangoes writes that answer. Lots of photos, each with its right answer. That is the machine's practice book, with the answers printed at the back. Teaching a machine by showing it examples like these is called training. What do you do in practice? You solve a question, check the answer at the back, and correct yourself a little where you went wrong. The machine does the same. But it has no mind, only numbers. A great many numbers. Think of these numbers as the knobs on a wedding DJ's mixing board, the little dials you turn. But here there is no DJ, and no single knob means 'yellow' or 'soft'. Together they make the answer. At the start these knobs are usually set anywhere at all. So on the first photo the machine's answer is just a guess. Its answer is a score: how ripe the mango looks, out of a hundred. It gave a ripe mango only thirty. Wrong. So what changes inside? Will a person come and write a new rule? Or will the knobs turn a little? Think. The knobs turn. The right answer was a hundred. The knobs turn a little in whichever direction makes that gap smaller. Who turns them? A training program that people wrote. But no person chooses how far each knob turns. And it usually happens not after every photo but after a small bundle of them. Check the answers, turn the knobs, then the next bundle. For now, take this much as given. How far and which way each knob turns is decided by a method from maths, which comes later in the course. So this is how a machine learns: a guess, a check against the answer, a small turn of the knobs, and again. Nobody wrote 'yellow means ripe'.
Check your understanding
TRY IT YOURSELF
Put the idea to work
Teach a machine yourself, then beat it. Right now, free, with no coding. There is a free website; its address is on screen and in the description below. No account, no login. It is made for a laptop's camera. On a phone the page opens too, in the browser, the app you open websites in. But whether it fully works on a phone, I cannot say for sure. If it does not, use a laptop. Get Started, Image Project, Standard image model. Then three boxes, which the screen calls classes: spoon, cup, empty table. No mangoes? Any three things will do. In each box take a few dozen photos with the camera. Then press Train Model. That is its practice. Now the exam: hold the spoon up to the camera, and see what the model says. Now beat it on purpose. Make the light very dim, change the room, or show it a photo of the spoon on another phone. Where it slips, you will see what it really learned: the spoon, or the light in your kitchen. How, with so few photos? Because the tool starts from a model that has already learned. You only teach its last part. And your photos? In the makers' own words, training happens inside your browser. Unless you choose to save it, nothing leaves.
Go to the source
- A. L. Samuel, "Some Studies in Machine Learning Using the Game of Checkers", IBM Journal of Research and Development, vol. 3, no. 3, July 1959, pp. 210-229 (publisher record on IEEE Xplore)
- A. L. Samuel, "Some Studies in Machine Learning Using the Game of Checkers", IBM Journal of Research and Development, vol. 3, no. 3, July 1959, pp. 210-229 (publisher record on IEEE Xplore)
- IBM Heritage, "The games that helped AI evolve" (undated); IBM Think, "What is machine learning?" (published 18 Aug 2025, updated 23 Nov 2026)
- IBM Heritage, "The games that helped AI evolve" (undated); IBM Think, "What is machine learning?" (published 18 Aug 2025, updated 23 Nov 2026)
- NIST Computer Security Resource Center glossary, entry "machine learning", definition sourced to NIST SP 800-55v1
- Google for Developers, Machine Learning Glossary (page last updated 6 Nov 2026)
- Goodfellow, Bengio, Courville, "Deep Learning" (MIT Press, 2016), chapter 5, section 5.1, online edition
- Google Machine Learning Glossary, entry "training" (last updated 6 Nov 2026)
- Google Machine Learning Glossary, entry "model"
- Google Machine Learning Glossary, entry "inference"
- Google Machine Learning Glossary, entry "label"
- Google Machine Learning Glossary, entry "training set"
- NIST AI 100-2e2025, "Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations" (2025 edition), section 2.1.1
- CBSE, "Class 10 Facilitator Handbook", Artificial Intelligence curriculum (hosted under Curriculum21; "Curated with support from Intel")
- Google for Developers, "Introduction to Machine Learning: Supervised Learning" (last updated 25 Aug 2025)
- Rumelhart, Hinton, Williams, "Learning representations by back-propagating errors", Nature vol. 323, pp. 533-536, published 9 Oct 1986 (abstract; full text is paywalled)
- Google for Developers, "What is Machine Learning?" (last updated 27 Jan 2026)
- Russakovsky et al., "ImageNet Large Scale Visual Recognition Challenge", arXiv:1409.0575v3, last revised 30 Jan 2015, Table 2 and the paragraph that cites it
- Krizhevsky, Sutskever, Hinton, "ImageNet Classification with Deep Convolutional Neural Networks", NeurIPS 2012, paper PDF, section 5
- Deng, Dong, Socher, Li, Li, Fei-Fei, "ImageNet: A large-scale hierarchical image database", CVPR, June 2009 (abstract on IEEE Xplore)
- Zech, Badgeley, Liu, Costa, Titano, Oermann, "Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: A cross-sectional study", PLOS Medicine, published 6 Nov 2018 (peer reviewed, open access)
- Beery, Van Horn, Perona, "Recognition in Terra Incognita", arXiv:1807.04975v2, 25 Jul 2018, accepted to ECCV 2018 (abstract)
- Recht, Roelofs, Schmidt, Shankar, "Do ImageNet Classifiers Generalize to ImageNet?", arXiv:1902.10811v2, 12 Jun 2019 (abstract)
- Ribeiro, Singh, Guestrin, "Why Should I Trust You?: Explaining the Predictions of Any Classifier", arXiv:1602.04938, submitted 16 Feb 2016 (the "Husky vs Wolf" experiment)
- Google, Teachable Machine FAQ (undated; site footer shows release 2.4.19)
- Google, Teachable Machine v1 page (2017 version, still live; opened at phone width)
- Teachable Machine, image project page, "Under the hood" vocabulary
- Teachable Machine home page, Tutorials, "Images: Bananameter"
- Machine Learning for Kids, Help page (undated)
- MIT App Inventor, Personal Image Classifier, training page (no help page was found on it)
- APEDA, Market Intelligence Cell, "Monthly dashboard: Mango", March 2026 (file dated 29 Apr 2026)
- Nandi (Univ. of Burdwan), Tudu (Jadavpur Univ.), Koley (NIT Durgapur), "A Machine Vision-Based Maturity Prediction System for Sorting of Harvested Mangoes", IEEE Transactions on Instrumentation and Measurement, vol. 63, no. 7, July 2014, pp. 1722-1730 (abstract)
- Jha, Narsaiah, Sharma, Singh and others (Central Institute of Post-harvest Engineering and Technology, Ludhiana), "Quality parameters of mango and potential of non-destructive techniques for their measurement: a review", Journal of Food Science and Technology 47(1):1-14, issue date Jan 2010
- Google Machine Learning Glossary, entry "auxiliary loss"; opened by the script writer
- Google Machine Learning Glossary, entry "classification threshold"; opened by the script writer