Introduction to Emerging Technologies
Primary 6 · Science and Elementary Technology
Introduction to Emerging Technologies
Lesson 5 of 5
30 min
Let's begin
A P6 class in Musanze has a challenge: teach a computer to sort mangoes from avocados. They will use a free website for schools, such as Machine Learning for Kids, and their own photos from the market. Follow their steps, and you will be able to do it too.
If you test a model with the same photos it trained on, it is like an exam that uses exactly the questions you memorised: you look clever, but it proves nothing. New photos show whether the model really learned what mangoes and avocados look like.
Accuracy tells you what part of the test the model got right, as a percentage:
accuracy = number correct ÷ number tested × 100
Example 1: The model is tested on 20 new photos and gets 17 right. 17 ÷ 20 = 0.85, and 0.85 × 100 = 85%.
Example 2: Another model gets 45 right out of 50. 45 ÷ 50 = 0.9, so the accuracy is 90%.
One group photographed all their avocados on a green banana leaf and all their mangoes on a white plate. Their model scored well at first. Then they tested a mango lying on a banana leaf, and the model said "avocado"! The model had learned the background, not the fruit.
To fix it, they took new photos of both fruits on many different backgrounds and trained again. When a model gives unfair or one-sided answers because of the data it learned from, we say it has a bias. In real life, bias in AI can be serious: some models used to choose job applicants or to recognise faces have been criticised for treating some people unfairly.
Tip
Train on some, test on others. Keep a pile of photos aside that the model never sees during training. Those are your test photos, and they tell you the truth about your model.
Answers
What you learned today
Sources and credits
The exercises (Try it yourself and the practice questions) are written by Ganzaa. Machine Learning for Kids is linked for information only; none of its material is copied here.
This lesson adapts CC BY-SA material and is shared under CC BY-SA 4.0.
Quick check
Put the six steps of machine learning in order.
Tap the cards in the right order.