Welcome back, young AI builder! In Module 2, you built simple chatbots and automation rules. Now we are going to explore the most exciting part: Machine Learning – how AI learns and improves by itself!
“AI & Automation Level One – Module 3: Machine Learning – How AI Gets Smarter”
Hello! 👋 In Module 2, you built a chatbot and an IFTTT automation. But those were like “cooking from a recipe” – you gave the steps. Now, what if the machine could create its own recipe based on what it sees? That is Machine Learning.
Machine Learning (ML) is a special type of AI that learns from data. It finds patterns by itself. The more data you give it, the smarter it gets. In this module, we will learn how ML works, we will train a simple ML model, and we will see how ML is used in the real world.
Ready to become a Machine Learning explorer? Let’s go! 🚀
Chidi lives in Enugu. He loves growing tomatoes. But he noticed that sometimes the tomatoes get sick. He asked his teacher: “How do I know if a tomato is healthy?” The teacher said: “Healthy tomatoes are red, firm, and round. Sick ones are yellow, soft, or have spots.”
Chidi took 100 photos of healthy tomatoes and 100 of sick tomatoes. He showed them to a computer program. The program looked at the colours, shapes, and spots. It learned the difference. Then Chidi took a new photo of a tomato. The program said: “This tomato is healthy!” It was correct.
Chidi used Machine Learning. He didn’t tell the computer the rules. The computer learned the rules by looking at many examples.
🍅 CHIDI’S ML PROCESS Step 1: Gather photos (data) Step 2: Label them (healthy / sick) Step 3: Train the ML model Step 4: Test with new photo Step 5: Model predicts “healthy” or “sick”
Definition: Machine Learning is a way for computers to learn from data without being programmed step-by-step.
Why important? ML lets AI discover patterns we might not see.
Simple explanation: It’s like teaching a friend to identify birds by showing them many pictures, not by telling them rules.
Real-life example: Email spam filters use ML to learn which emails are spam.
School example: A program that learns to sort shapes by showing it examples.
Home example: A smart thermostat that learns when you like the house warm.
Nigerian example: An ML app that identifies crop diseases from photos.
🧠 MACHINE LEARNING Data → ML Algorithm → Finds Patterns → Makes Predictions (Gets better with more data)
Mini summary: Machine Learning is AI that learns from data by finding patterns.
Definition: Features are the things we look at (like colour, size). Labels are the answers (like “apple” or “orange”).
Why important? ML learns the relationship between features and labels.
Simple explanation: If you teach a child about fruits, you say “This is an apple (label) because it is red and round (features).”
Real-life example: In a house price predictor, features are size, location, number of rooms. Label is the price.
School example: Features: height, weight. Label: age.
Home example: Features: brand, size, colour. Label: “my favourite shoe”.
Nigerian example: Features: colour, size, smell. Label: “ripe” or “unripe” for plantain.
🍌 FEATURES AND LABELS Features: Colour = Yellow, Length = 20cm, Spots = None Label: Ripe Plantain ✅
Mini summary: Features are what we observe; labels are the answers we want.
Definition: Training is when we give the ML model many examples with features and labels so it learns.
Why important? Without training, ML knows nothing.
Simple explanation: Like studying for a test. You read many pages, then you know the answers.
Real-life example: An ML model is trained on thousands of X-ray images to detect diseases.
School example: You learn maths by doing many problems.
Home example: A robot vacuum learns your room layout after a few cleanings.
Nigerian example: An ML model trained on photos of Lagos traffic to predict congestion.
🏋️ TRAINING PROCESS Data In → ML Algorithm → Adjusts Rules → Better Predictions (Repeat many times)
Mini summary: Training is feeding data to ML so it can learn.
Definition: Testing is giving the ML model new data it has never seen to see if it predicts correctly.
Why important? We need to know if the ML is smart or just memorising.
Simple explanation: After studying, you take a test with new questions.
Real-life example: A self-driving car is tested on roads it has never driven on.
School example: A teacher gives a quiz with new types of problems.
Home example: You try a new recipe you’ve never cooked before.
Nigerian example: An ML model for crop disease is tested on a farm it has never seen.
📝 TESTING New Data → ML Model → Prediction → Compare with Actual Label If many correct → ML is good!
Mini summary: Testing checks if ML works well on new, unseen data.
Definition: Overfitting is when ML memorises the training data but cannot handle new data.
Why important? It makes ML useless in real life.
Simple explanation: Like memorising answers to only one test, but failing a different test.
Real-life example: An ML model that recognises only the exact cat photos it saw, but not a new cat.
School example: You memorise the times table but cannot solve word problems.
Home example: A robot that can find a toy in one room but gets lost in another.
Nigerian example: An ML model trained only on rainy season crops fails in the dry season.
⚠️ OVERFITTING Training Data: 100% correct New Data: 50% correct (bad!) Solution: Use more varied data.
Mini summary: Overfitting is bad – ML should learn general patterns, not memorise.
Definition: Underfitting is when ML does not learn the patterns at all.
Why important? It means the ML is too simple to understand the data.
Simple explanation: Like trying to learn maths but only reading one page.
Real-life example: An ML model that always says “cat” even for dogs.
School example: You guess all answers “A” on a test.
Home example: A thermostat that always sets 25°C regardless of weather.
Nigerian example: An ML model that predicts “rain” every day, even in dry season.
😴 UNDERFITTING ML: “All fruits are apples.” Reality: Many fruits exist. Solution: Make ML more complex or give more data.
Mini summary: Underfitting is when ML is too simple to learn the patterns.
Definition: Supervised learning is when we give ML features and labels (answers) during training.
Why important? This is the most common type of ML.
Simple explanation: Like a teacher giving you questions and answers, so you learn.
Real-life example: Predicting house prices using past sales data.
School example: Learning with a textbook that has exercises and solutions.
Home example: A parent teaches you to sort clothes by colour.
Nigerian example: An ML model trained on past exam scores to predict future scores.
👨🏫 SUPERVISED LEARNING Input: Features + Labels (answers) ML learns the relationship Then: Given features, predicts label.
Mini summary: Supervised learning uses labeled data – like studying with an answer key.
Definition: Unsupervised learning is when we give ML data without labels, and it finds patterns itself.
Why important? It helps discover hidden groups in data.
Simple explanation: Like sorting a pile of mixed toys into groups by yourself without being told the groups.
Real-life example: Grouping customers by shopping behaviour.
School example: Sorting students by their favourite subjects without asking.
Home example: Organising your books by colour or size.
Nigerian example: Grouping villages by weather patterns without labels.
🔍 UNSUPERVISED LEARNING Data (no labels) → ML finds clusters → Group 1, Group 2... (Example: grouping fruits by shape, not name)
Mini summary: Unsupervised learning finds patterns without labels – like exploring alone.
Definition: Reinforcement learning is when ML learns by trying things and getting rewards or penalties.
Why important? It’s how AI learns to play games and make decisions.
Simple explanation: Like training a dog: give a treat when it does something right.
Real-life example: AI that learns to play chess by playing millions of games.
School example: Getting a gold star for good behaviour.
Home example: A child learns to clean their room because they get pocket money.
Nigerian example: An AI that learns to control traffic lights to reduce waiting time.
🎮 REINFORCEMENT LEARNING Action → Result → Reward (good) or Penalty (bad) Learns to choose actions that give more rewards.
Mini summary: Reinforcement learning is learning by rewards, like game AI.
ML is everywhere! Some examples:
📱 ML IN YOUR PHONE Camera → Detects face → Unlocks phone (Uses ML trained on your face!)
Mini summary: ML is used in phones, shopping, music, cars, and farming.
🇳🇬 ML IN NIGERIA Farmer takes photo of cassava ML says: “Healthy” or “Diseased” Farmer takes action early.
Mini summary: ML is helping Nigerians in farming, banking, and traffic.
You can build an ML model using Teachable Machine (a free tool). Steps:
🖼️ TEACHABLE MACHINE Class 1: Cats (20 photos) Class 2: Dogs (20 photos) Train → Model learns → Test with new photo Result: “Cat” or “Dog”
Mini summary: You can build an ML model with Teachable Machine in minutes!
Use Teachable Machine for hands-on activity. Emphasise that ML is not magic – it needs data. Use group discussions about overfitting.
Try Teachable Machine with your child. Discuss how ML is used in the apps you use.
| Type | Has labels? | How it learns | Example |
|---|---|---|---|
| Supervised | Yes | With teacher | House price prediction |
| Unsupervised | No | Finds patterns alone | Customer grouping |
| Reinforcement | No | Rewards and penalties | Game AI |
Amazing work! You now know what Machine Learning is. You learned about features, labels, training, testing, overfitting, and underfitting. You also discovered three types of ML: supervised, unsupervised, and reinforcement. You saw how ML is used in Nigeria and around the world. You even built your own ML model with Teachable Machine. You are now an ML explorer! In the next module, we will learn about Data Science – how to clean and prepare data for AI. Keep going!
| Term | Definition |
|---|---|
| Features | Details we observe |
| Labels | Answers we want |
| Overfitting | Memorising data |
| Supervised | Learning with labels |
| Reinforcement | Learning with rewards |
Scenario: You have an ML model that predicts if a student will pass an exam. It was trained only on students from one school. Now you use it on students from another school, and it does poorly. Why? (Overfitting or data bias). How would you fix it?
In groups, use Teachable Machine to train a model that distinguishes between two types of objects (e.g., books vs. pencils). Present your model to the class.
Write down 3 features and 3 labels for each of these: (1) A car, (2) A fruit, (3) A person.
Create a simple ML model using Teachable Machine that can identify three different hand gestures. Train it, test it, and show it to your class.
Collect 30 images of two different objects (e.g., cups and bottles). Use Teachable Machine to train a model. Test it with 10 new images. Write a short report on your accuracy.
Think of a problem in your community that ML could help solve. Describe the features and labels you would need.
Fill-in: 1.Machine Learning 2.Features 3.Label 4.Overfitting 5.Supervised
True/False: 1.T 2.F 3.T 4.T 5.F
MCQ: 1.b 2.a 3.c 4.a 5.a 6.a 7.a 8.b 9.a 10.a 11.a 12.a 13.a 14.a 15.c
In Module 4, we will learn about Data Science – how to collect, clean, and organise data for AI. We will also learn about data bias and how to make data fair. Keep your curiosity alive!
🎉 Fantastic! You are now a Machine Learning explorer. See you in Module 4! 🎉