No history yet

Introduction to Supervised Learning

Learning with an Answer Key

Imagine trying to learn a new language with a stack of flashcards. On one side of each card is a word in your native language, and on the other side is its translation. By studying these pairs, you slowly learn to connect the words to their translations. After enough practice, you can look at a new word and guess its translation correctly. This is the basic idea behind supervised learning.

Supervised learning is like teaching a kid using flashcards.

In machine learning, the “flashcards” are called labeled data. Each piece of data comes with an input (the word) and a corresponding correct output, or label (the translation). The machine learning model studies thousands or even millions of these input-output pairs. It learns the underlying patterns that connect the inputs to their labels. The goal is for the model to get so good at recognizing these patterns that it can make accurate predictions when it sees new, unlabeled data.

Lesson image

Two Main Tasks

Supervised learning models are typically used for two main types of tasks: classification and regression. The one you choose depends on the kind of question you're trying to answer.

Classification

noun

A supervised learning task where the goal is to predict a categorical label.

Think of classification as sorting things into groups. The output is a distinct category. Is this email spam or not spam? Does this picture contain a cat or a dog? Is this credit card transaction fraudulent or legitimate? In each case, the answer comes from a fixed set of possibilities.

Regression

noun

A supervised learning task where the goal is to predict a continuous numerical value.

Regression is about predicting a number. Instead of sorting, you're forecasting a specific value. What will the temperature be tomorrow? How much will this house sell for? How many minutes until the next bus arrives? The answer isn't a category, but a value on a continuous scale.

TaskGoalExample
ClassificationPredict a categorySpam or Not Spam
RegressionPredict a numberHouse Price

Let's check your understanding of these core concepts.

Quiz Questions 1/5

What is the fundamental requirement for training a supervised learning model?

Quiz Questions 2/5

A machine learning model is trained to determine if a patient's medical scan shows a tumor or not. What type of task is this?

Understanding these two tasks is the first step in mastering supervised learning. It all comes down to what you want to predict: a category or a quantity.