Machine Learning Basics SS2 Digital Technologies Lesson Note

Download Lesson Note
Lesson Notes

Topic: Machine Learning Basics

Can a Machine “Learn”?

Normally, if we want a computer to do something, we give it a strict list of instructions (an algorithm). For example: “To make a toast, heat the bread for 2 minutes.”

But how do you give instructions for something complicated, like recognizing a face? Everyone’s face is different! Instead of giving the computer a million rules, we give it data and let it figure out the patterns itself.

Machine Learning (ML) is a type of Artificial Intelligence that allows a computer to learn from experience (data) without being specifically programmed for every single task.

 

How Machine Learning Works: The “Child” Analogy

Think about how a toddler learns what an “Orange” is:

  1. Training: You show the child an orange and say, “This is an orange.” You show them a green one, a small one, and a bumpy one.
  2. The Features: The child’s brain notices patterns: It’s round, it’s orange-colored, and it has a certain smell.
  3. Testing: You show the child a fruit they’ve never seen before. The child looks at the features and says, “That is an orange!”

In Machine Learning, we do the same:

  • The Dataset: The thousands of pictures we show the computer.
  • The Model: The “brain” the computer builds based on the patterns it sees.
  • Prediction: When the computer sees new data and makes a guess.

 

The Three Main Types of Machine Learning

Computers learn in different ways, depending on what we want them to do:

  • Supervised Learning (Learning with a Teacher): We give the computer the data and the answers. (e.g., “Here are 1,000 photos of cats and 1,000 photos of dogs. Learn the difference.”)
  • Unsupervised Learning (Finding Patterns Alone): We give the computer data but no answers. The computer looks for groups. (e.g., “Here is a list of 5,000 customers; group them based on what they like to buy.”)
  • Reinforcement Learning (Trial and Error): The computer learns by playing a “game.” If it does something right, it gets a “point.” If it does something wrong, it loses a point. This is how robots learn to walk or play chess.

 

Simple Applications: ML in Your Pocket

You probably use Machine Learning every day without realizing it!

  • Email Spam Filters: Your email “learns” which messages look like junk (spam) and moves them to the bin automatically.
  • Face ID: Your phone learns the specific “patterns” of your face (the distance between your eyes, the shape of your nose) to unlock.
  • Voice Assistants (Siri/Google): They learn to understand your specific accent and way of speaking over time.
  • Social Media Feeds: TikTok and Instagram “learn” which videos you watch the longest and show you more of those.

 

Summary Table: Traditional vs. Machine Learning

Feature Traditional Programming Machine Learning
Instructions Manually written by a human. Discovered by the computer.
Best for… Simple tasks (Calculations). Complex tasks (Recognizing voices).
Changes Stays the same until a human edits it. Gets better/smarter as it gets more data.
Example A basic calculator app. A self-driving car.

 

Why Machine Learning is Important for Nigeria

ML isn’t just for big tech companies. It can solve local problems:

  • Agriculture: ML can analyze photos of cassava leaves to tell a farmer if the plant has a disease.
  • Banking: It can help local banks decide who is likely to pay back a loan fairly.
  • Language: It helps translate our local languages (Hausa, Igbo, Yoruba) into English so we can communicate with the world.

 

Class Discussion / Review Questions

  1. In your own words, what is the difference between “Data” and a “Model”?
  2. If you wanted to teach a computer to identify “Fake News,” would you use Supervised or Unsupervised learning? Why?

Activity: Think of one problem in your neighborhood (e.g., traffic, electricity, or trash). How could a “learning machine” help solve it?

Lesson Notes for Other Classes