Module 5 – Machine Learning Basics
beginner15 XP

Sorting Cats vs Dogs (And Everything Else!) 🐱🐶

How machine learning classifies things — from pet photos to spam emails

Sorting Cats vs Dogs 🐱🐶

What IS Machine Learning?

Machine Learning (ML) = Teaching computers to learn from data and make decisions without being explicitly programmed for every situation.

Instead of writing: "If furry AND four legs AND says meow → cat" ML learns: "Here are 1 million cats and 1 million dogs. Figure it out yourself!"

The Classification Problem

Sorting things into categories is called classification — it's ML's most common job:

| Task | Categories | |------|-----------| | Email | Spam / Not spam | | Skin scan | Concerning / Normal | | Movie review | Positive / Negative | | Dog photo | Breed identification | | Your post | Suitable / Remove |

📸 Instagram's Super Power

Every time you post on Instagram, AI classifies:

  • What objects are in the photo 🌮🐶🏀
  • What the mood is
  • Whether it follows community guidelines
  • What hashtags might be relevant
  • Who's in the photo (your friends!)

All of this happens in milliseconds!

🎮 Try It: What Would You Use to Classify These?

"FREE BITCOIN CLICK NOW!!!" → Spam? Not spam? [Photo: wagging golden retriever] → Dog? Cat? Other? Review: "This film was AMAZING, I cried!" → Positive? Negative?

A human could answer these instantly. ML teaches AI to do the same!

The Training Secret

Input 1,000 spam emails → labelled "spam" Input 1,000 normal emails → labelled "not spam" AI learns which WORDS appear in spam: - "FREE", "WIN", "CLICK NOW", "URGENT" → spam signals - "Meeting", "Hi Tom", "Can you help" → normal signals New email arrives → AI checks for those patterns → Decision!

💡 Did You Know?

Gmail's spam filter blocks 10 million spam emails per minute using ML. Without it, your inbox would be pure chaos! 📧

Quick check

01/2

What is 'classification' in machine learning?