Swipe
SwipeSwipe
Swipe Apps

Paths

Motivation

Information

Classification vs. Regression · Lesson 6 of 9

Regression: Predicting a Number

A free lesson from Swipe AI · Machine Learning Fundamentals, level 2 · updated October 2026

By the Swipe team, founded by Colin · how we make lessons

Regression shares supervised learning's core setup — labeled training examples — but the output is a number along a continuous range rather than a category. That changes what 'correct' even means: a classifier is either right or wrong about the category, but a regression prediction can be closer or further from the true number.

Take a food delivery app predicting delivery time: the inputs might be distance, current traffic, and time of day, and the output is a number of minutes. If the true delivery took 34 minutes and the model predicted 31, that's a small, forgivable miss — nowhere near as bad as predicting 5 minutes or 90.

The same input/output/training-examples shape from Level 1 still applies: for house price prediction, the inputs are features like square footage, location, and number of bedrooms; the output is a predicted price; and the training examples are real past sales where the true final price is already known.

Some things can be framed either way depending on what you actually need: predicting a movie rating as 'exactly 7.3 out of 10' is regression, but predicting it as 'good, okay, or bad' is classification. The right framing depends on whether you need a precise number or just a useful bucket.

Quick check

Why can a regression prediction be "closer" or "further" from the truth in a way a classification prediction cannot?

Fill in the blank

Predicting the exact number of minutes a delivery will take, based on distance, traffic, and time of day, is an example of ____.

True or false

The same real-world question can sometimes be framed as either a classification or a regression problem, depending on whether you need a precise number or a useful category.

Chapter quiz

Classification vs. Regression

10 questions · pass with 60% — just like in the app.

Quick check

Which best describes a classification task?

Quick check

Which of these is a regression problem?

True or false

A classification model can output a category that never appeared in its training examples.

Fill in the blank

A supervised learning task where the output is a number along a continuous range is called ____.

Quick check

What is multi-class classification?

True or false

A regression prediction can be closer or further from the true value, unlike a classification prediction, which is simply right or wrong about the category.

Fill in the blank

Most classifiers estimate how likely an input belongs to each category, then return the category with the highest ____.

Quick check

Predicting a movie rating as "good, okay, or bad" instead of "7.3 out of 10" reframes the problem from regression into what?

True or false

The same real-world question can sometimes be framed as either classification or regression, depending on whether a precise number or a useful category is needed.

Fill in the blank

In a house-price prediction system, the price being predicted is the ____, and since it is a continuous number, this is a regression problem.

Keep your streak going in Swipe AI

Swipe through every level of Machine Learning Fundamentals on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.

Get the Swipe apps →