Module 2 · Lesson 3

Imagine practicing with flashcards. You answer a question, turn the card over, compare your answer with the expected one, and adjust. Supervised learning follows a similar idea: examples come with target outputs that tell the learning algorithm what it is trying to predict.

Inputs, targets, and a learned mapping

The input variables are often called features. The expected output is commonly called a label or target.

Suppose we want to estimate a home's sale price. Inputs might include square footage, location, age, and number of bedrooms. The target is the actual sale price observed in historical data.

Features X → model → predicted Y
                     ↓
               compare with
                  target Y

Training adjusts the model so that its predictions become better according to a chosen loss function.

Classification and regression

Two common supervised-learning problem types are:

  • Classification: predict a category, such as spam or not spam.
  • Regression: predict a continuous value, such as a price or temperature.

Real systems can be more complex than this simple split, but it is a useful starting point.

Labels do not always mean manual human labeling

A common beginner description says supervised learning requires humans to label every example. Sometimes it does, especially in image or text annotation projects. But targets can also come from existing business records, sensors, historical outcomes, experiments, or other processes.

What matters is that the training example has a target the model can learn against.

Training data is not enough by itself

A model can perform extremely well on examples it has already seen and still fail on new ones. That is why machine-learning workflows usually separate data into training, validation, and test sets.

  • Training data is used to update the model.
  • Validation data helps tune decisions during development.
  • Test data provides a more independent check of generalization.

The goal is not memorization of the training set. The goal is to learn a pattern that remains useful on unseen data.

Supervised learning is powerful because it turns known examples into predictive behavior, but its quality depends heavily on how representative, accurate, and unbiased those examples are.


Demystifying AI series

← How Machines Represent Data as Numbers   ·   Unsupervised Learning →