Skip to main content

Machine Learning Explained Simply: My Learning Journey, from Spam Filters to AI

 What Brings You Here?

Maybe you’re fascinated by the current wave of Large Language Models (LLMs) and the potential of Artificial Intelligence (AI) and Machine Learning (ML) in powering generative AI.
Or perhaps you’re not particularly impressed by LLMs, but you still want to dive deep into AI and ML for your own growth.

Either way, welcome!

This blog documents my personal journey of learning machine learning. As I study each topic, I’ll share my perspective in the simplest words possible so that others can also learn complex concepts in an easy way.

In today’s post, we’ll explore:

  • What machine learning is
  • Why it’s useful
  • Its formal definition
  • How it differs from traditional programming
  • Machine Learning Applications or example use cases

Before jumping into definitions, let’s start with an example.


A Classic Example: The Spam Filter

One of the earliest and most well-known applications of ML is the spam filter — the system in your email (Gmail, Outlook, Yahoo, etc.) that identifies which messages are spam and which are legitimate (“ham”).

Instead of manually writing hundreds of rules to detect spam, the spam filter learns from examples. It looks at features like the sender’s address, specific keywords, and message patterns, then adapts over time as spam messages evolve.


Another Early Milestone: Optical Character Recognition (OCR)

OCR: the process of converting printed text into digital text, is another classic ML task. A notable advancement came from Geoffrey Hinton (often called the Godfather of AI), whose research in the mid-2000s reignited interest in deep learning after it had fallen out of favor for years.

While OCR is part of a broader AI category, it illustrates the power of machine learning and, more specifically, deep learning, to tackle complex real-world problems.


So, What Is Machine Learning?

At its core, machine learning is about enabling a computer program to learn from data and make predictions or decisions without being explicitly programmed to perform that specific task.

One of the earliest informal definitions came from Arthur Samuel (1959):

Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed.

Remember, Arhture Samuel introduced the machine learning term, having worked at IBM, and he is a pioneer in computer gaming and artificial intelligence.

Here, "learn" and  "being explicitly programmed" caught my attention. So let's break it down for clarification:

  • “Gives computers the ability to learn”
    This means a computer can improve its performance at a task by analyzing examples or past experiences, instead of just following fixed instructions.

  • “Without being explicitly programmed”
    In traditional programming, we tell the computer exactly what steps to follow for every possible scenario. In machine learning, we don’t hard-code these rules.
    Instead, we feed the computer data (like thousands of spam and non-spam emails) and an algorithm that can find patterns in that data.
    The computer figures out its own set of “rules” from these patterns — rules we didn’t directly write.

In short:
Traditional programming is like teaching by giving a complete recipe.
Machine learning is like giving many examples of finished dishes and letting the student figure out the recipe on their own.

Another more formal definition was given by Tom M. Mitchell:

A computer program is said to learn from experience (E) with respect to some task (T) and some performance measure (P), if its performance at task T, as measured by P, improves with experience E.

Here:

  • E (Experience) is the data the system learns from. Formally, it is called Training set
  • T (Task) is the specific problem it’s trying to solve (e.g., classifying emails as spam or not).
  • P (Performance Measure) is how we evaluate success (e.g., accuracy of classification).

Why Do We Need Machine Learning? How Is It Different from Traditional Programming?

Let’s return to our spam filter example.

In traditional programming, you would manually write rules to identify spam. For instance, you might scan the text of an email, look for certain keywords, check the sender’s address, or analyze the structure of the message. If a message matched these conditions, you’d classify it as spam.

The problem?

  • You’d need to write a lot of rules to cover different spam types.
  • If spammers changed their tactics, for example, by avoiding certain keywords or using new tricks, you would have to update your rules manually.
  • Over time, the program would become complex, difficult to maintain, and still might not catch all spam.


In machine learning, we take a different approach:

  • Instead of manually writing rules, we feed the system thousands of examples of spam and legitimate (“ham”) emails.

  • The algorithm learns patterns and characteristics that distinguish spam from ham, without us explicitly telling it the rules.

  • As new spam examples appear, we can retrain the model with updated data, and it will adapt automatically.

This approach offers:

  • Better adaptability — the system evolves as spam patterns change.

  • Simpler maintenance — no need to manually rewrite dozens of rules.

  • Improved accuracy — the algorithm can detect subtle patterns humans might miss.


When to Use ML vs. Traditional Programming

It’s important to note that machine learning is not always the best choice.

  • If a problem is well-defined and can be solved with a fixed set of rules, traditional programming is simpler and more efficient.

  • If the problem involves patterns in large, complex, or constantly changing data, machine learning often provides better results.


Bonus: ML as a Tool for Discovery

Machine learning doesn’t just automate decisions — it can also help humans learn. Fields like data mining use similar techniques to uncover hidden patterns in massive datasets, providing insights that would be impossible to detect manually.


So in summary, 

  • Traditional programming: You write the rules, the computer follows them.

  • Machine learning: The computer learns the rules from data.

When the environment is stable, rules-based programming works well. But in dynamic, data-rich situations, machine learning shines — adapting quickly, finding patterns, and improving with experience.

Everyday Applications of Machine Learning

We’ve already talked a lot about the spam filter, but machine learning is everywhere around you — often in ways you might not even notice. Here are some common examples:

  • Content Recommendations

    • YouTube suggests videos based on your watch history and engagement patterns.

    • E-commerce sites like Amazon recommend products based on your browsing and purchase history. Many of these systems use machine learning algorithms, including deep learning.

  • Fraud Detection

    • Banks use anomaly detection to spot unusual credit card transactions that might indicate fraud.

  • Customer Segmentation

    • Businesses use clustering algorithms to group customers by shared behaviors or preferences, enabling targeted marketing campaigns.

  • Predictive Analytics

    • Estimating a company’s revenue for the next year or predicting the price of a house based on location, number of rooms, and construction date.

  • Natural Language Processing (NLP)

    • Flagging offensive comments on social media.

    • Powering chatbots and virtual assistants that can understand and respond to human language.

  • Industrial and Manufacturing Applications

    • Detecting defective products on an assembly line using cameras and image recognition algorithms.

  • Healthcare

    • Reading X-rays or MRI scans to detect tumors, identifying whether they are benign or malignant.

  • Speech Recognition

    • Converting spoken words into text or commands, using models like RNNs (Recurrent Neural Networks) and Transformers.

These examples only scratch the surface. Once you start looking, you’ll notice machine learning quietly powering many systems in your daily life, from the apps you use to the services you rely on.

Comments