Free to read. Sign up to save your progress and take knowledge-check quizzes.

Sign up free
10 min read·Updated March 3, 2026

How Machines Learn

Explore supervised, unsupervised, and reinforcement learning — and why data quality determines AI quality.

Listen to this lesson

Free preview · first 0:30
0:00 / 0:30

Audio & video lessons are paid features

Plus unlocks audio streaming. Pro adds downloadable audio, video, certificates, and more.

Plus adds:
  • Audio streaming
  • Downloadable PDFs
  • All AI Playbooks
  • Personalized content
Pro also adds:
  • Certificates of completion
  • Audio MP3 downloads
  • Video lessonssoon
  • & More…soon

Watch this lesson

Video coming soon

Learning Objectives

  • Explain the three main types of machine learning: supervised, unsupervised, and reinforcement learning
  • Understand why data quality is the foundation of AI performance
  • Recognize the tension between overfitting and generalization

What Is Machine Learning?

Machine learning (ML) is the practice of building systems that learn from data rather than being explicitly programmed with rules. Instead of writing if the email contains "free money" then mark as spam, you show the system thousands of spam and non-spam emails, and it learns the patterns itself.

This shift — from hand-coded rules to learned patterns — is why machine learning enabled AI to tackle problems that were previously unsolvable.

The Three Types of Machine Learning

1. Supervised Learning

In supervised learning, the training data includes both inputs and the correct outputs (labels). The model learns to map inputs to outputs.

Examples:

  • Spam detection: input = email text, label = spam/not spam
  • Image classification: input = photo, label = "cat", "dog", "car"
  • Predicting house prices: input = square footage + location, label = sale price

The word "supervised" refers to the human supervision involved in labeling the data. This is the most common type of ML in production.

2. Unsupervised Learning

In unsupervised learning, the training data has no labels. The system finds structure in the data on its own.

Examples:

  • Clustering customers by purchasing behavior
  • Anomaly detection in network traffic
  • Dimensionality reduction for visualization

💡Key Concept

Embeddings — a key output of unsupervised learning — are mathematical representations that capture the "meaning" or relationships between things (words, images, products). Embeddings power search engines, recommendation systems, and the semantic understanding in LLMs.

3. Reinforcement Learning

In reinforcement learning (RL), an agent learns by interacting with an environment and receiving reward signals. It tries actions, observes outcomes, and adjusts its strategy to maximize long-term reward.

Examples:

  • Game-playing AI (AlphaGo, chess engines)
  • Robot locomotion and manipulation
  • Training LLMs to be helpful — a technique called RLHF (Reinforcement Learning from Human Feedback)

Why Data Quality Is Everything

All machine learning depends on data. The quality, quantity, and diversity of your training data determines the quality of your model. This is not an exaggeration:

  • Biased data → biased model. If a hiring tool is trained only on historical hires from a male-dominated industry, it will learn to favor male candidates.
  • Insufficient data → poor generalization. A medical imaging model trained only on one hospital's images may fail on images from different equipment or populations.
  • Noisy data → unreliable outputs. Incorrect labels and corrupted inputs degrade model performance.

"Garbage in, garbage out" is more true of ML than almost any other field.

Overfitting, Underfitting, and Generalization

This is one of the central challenges in all machine learning.

Overfitting: The model learns the training data too well — it memorizes specific examples rather than learning general patterns. It performs well on training data but fails on new data.

Underfitting: The model is too simple to capture the underlying patterns. It performs poorly on both training and new data.

Generalization: The goal — a model that learns true patterns and performs well on data it has never seen before.

The standard practice is to split your data into training, validation, and test sets. You train on the training set, tune on the validation set, and evaluate final performance only on the test set (which the model never sees during training).

Key Takeaways

  • Machine learning shifts from hand-coded rules to learned patterns — models discover structure from data
  • Three learning paradigms: supervised (labeled data), unsupervised (unlabeled data), reinforcement (reward signals)
  • Data quality is the primary determinant of model quality
  • The tension between overfitting (memorizing) and generalization (learning) is central to ML engineering

Save your progress & take the quiz

Sign up free to bookmark lessons, track which modules you've completed, and lock in what you learned with a quick knowledge-check quiz at the end of each lesson.

🧭Recommended for you