Classification predicts categories such as spam or not spam, while regression predicts numerical values such as house prices
Now that you understand what supervised learning is, how labeled data works, and how a model is trained, the next question is:
What exactly does a supervised learning model predict?
In most beginner-level supervised learning problems, the answer falls into one of two categories:
Classification → predicts a category
Regression → predicts a numerical value
This difference may look small, but it is one of the most important concepts in machine learning.
Imagine two AI systems.
The first receives an email and predicts:
Spam
The second receives information about a house and predicts:
$385,000
Both systems can use supervised learning.
But they are solving completely different types of problems.
The first is performing classification.
The second is performing regression.
Let's understand both properly.
What Is Classification in Machine Learning?
Classification is a supervised learning task in which a model predicts which category, class, or label an input belongs to.
In simple words:
Classification answers: “Which group does this belong to?”
For example, suppose an email arrives in your inbox.
A machine learning model could classify it as:
Spam
Not Spam
The answer is a category, not a continuous numerical amount.
That makes it a classification problem.
Real-Life Classification Examples
You experience classification systems more often than you may realize.
Situation
Possible Prediction
Email filtering
Spam / Not Spam
Image recognition
Cat / Dog
Online payment
Fraud / Legitimate
Customer prediction
Will Leave / Will Stay
Product review
Positive / Negative
Support request
Billing / Technical / Account
Photo tagging
Beach / City / Forest
Although these applications look different, they all ask roughly the same question:
Which class should this example belong to?
How Does Classification Work?
Let's return to the spam-email example.
Suppose we have thousands of previous emails.
Each one has already been labeled:
Spam
or
Not Spam
The model can learn from information such as:
words used in the email
sender information
number of links
subject line
unusual phrases
message structure
During training, the model learns which patterns are associated with each category.
Later, a new email arrives:
“Congratulations! Claim your exclusive reward now.”
The model analyzes it and may estimate:
Spam probability: 94%
The system can then classify the email as:
Spam
Notice something important.
The model may calculate a probability internally, but the final task is still classification because the desired output is a category.
What Is a Class?
In classification, a class is simply one of the possible categories the model can predict.
For a spam detector:
Spam = one class
Not Spam = another class
For animal recognition:
Cat
Dog
Horse
Bird
Each of those is a class.
The number and structure of these classes determine what kind of classification problem we have.
The three important types beginners should know are:
Binary classification
Multiclass classification
Multilabel classification
1. Binary Classification
Binary classification is a classification problem with only two possible classes.
“Binary” simply means two choices.
Examples include:
Spam / Not Spam
Yes / No
Fraud / Legitimate
Pass / Fail
Defective / Acceptable
Will Cancel / Will Stay
Simple Example: Fraud Detection
Imagine a payment platform examines a new transaction.
The model looks at features such as:
transaction amount
location
device
purchase pattern
time of transaction
It then predicts:
Fraud
or
Legitimate
Because there are only two possible classes, this is binary classification.
Easy Memory Trick
Binary classification = two possible categories
If the answer is essentially A or B, you are probably dealing with a binary classification problem.
2. Multiclass Classification
What if the model needs to choose from more than two categories?
That is called multiclass classification.
Multiclass classification predicts one class from three or more possible classes.
Imagine an image-recognition system.
Possible categories are:
Cat
Dog
Horse
Bird
A new image is shown to the model.
It predicts:
Dog
There were several possible choices, but the model selected one.
That is multiclass classification.
Real-Life Multiclass Example: Customer Support
Suppose a company receives thousands of customer messages every day.
Instead of a person manually sorting each request, a model could classify messages into:
Billing
Technical Support
Account Problem
Delivery
Refund
A customer writes:
“I was charged twice for my subscription.”
The model predicts:
Billing
This is multiclass classification because there are several categories, but the message is assigned to one main category.
Another Example: Handwritten Digits
Imagine a model reading handwritten numbers.
Possible classes are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
The model sees one image and predicts:
7
Again:
Many possible classes.
One final class.
That is multiclass classification.
3. Multilabel Classification
Multilabel classification sounds similar to multiclass classification, but they are not the same.
Multilabel classification allows one example to belong to multiple categories at the same time.
Imagine you upload a photograph containing:
a beach
the ocean
a sunset
palm trees
A model does not have to choose just one.
It could assign several labels:
Beach + Ocean + Sunset + Palm Trees
That is multilabel classification.
Multiclass vs Multilabel Classification
This distinction is important.
Multiclass
There are many possible categories, but usually one class is selected.
Example:
“What animal is in this image?”
Answer:
Dog
Multilabel
The same example can receive several labels simultaneously.
Example:
“What appears in this image?”
Answer:
Dog + Grass + Outdoor + Daytime
Here is the difference:
Feature
Multiclass
Multilabel
Number of possible labels
Multiple
Multiple
Labels chosen for one example
Usually one
Can be several
Example
Cat / Dog / Horse
Beach + Sunset + Ocean
Main question
Which class?
Which labels apply?
Memory Trick
Multiclass = many choices, usually one answer
Multilabel = many choices, multiple answers can be correct
Classification in One Simple Example
Imagine an online store wants to classify support tickets.
Training examples might look like this:
Message
Label
“My payment failed.”
Billing
“I forgot my password.”
Account
“My order hasn't arrived.”
Delivery
“The app keeps crashing.”
Technical
A new message arrives:
“Why was my card charged twice?”
The model examines patterns from previous examples and predicts:
Billing
That is supervised classification.
What Is Regression in Machine Learning?
Now imagine a completely different question.
Instead of asking:
“Which category?”
we ask:
“How much?”
That is where regression comes in.
Regression is a supervised learning task used to predict a numerical value.
Examples include:
house price
sales amount
delivery time
electricity usage
product demand
temperature
revenue
The result is not a category such as Spam or Dog.
It is a number.
Real-Life Regression Example: House Price Prediction
Suppose a real-estate company wants to estimate the selling price of a house.
The model receives features such as:
house size
bedrooms
bathrooms
location
property age
Training examples already include actual historical prices.
For example:
Size
Bedrooms
Age
Actual Price
1,500 sq. ft.
2
12 years
$225,000
2,100 sq. ft.
3
7 years
$340,000
2,800 sq. ft.
4
4 years
$470,000
After training, we give the model information about a new property.
It predicts:
$385,000
Because the answer is a numerical value, this is regression.
Real-Life Regression Example: Delivery Time
Imagine a food-delivery service wants to predict how long an order will take.
Possible features include:
distance
traffic
restaurant preparation time
time of day
weather
delivery location
The model might predict:
32 minutes
Again, the output is not a category.
It is a number.
Therefore:
Regression
Another Regression Example: Sales Forecasting
Suppose an online business wants to estimate next week's sales.
Historical data might include:
previous sales
product prices
promotions
season
day of the week
Spam Detection
Cat vs Dog
website traffic
The model receives those inputs and predicts:
Expected sales next week: $46,500
That is also a regression problem.
Classification vs Regression: The Main Difference
For beginners, this is the most important table in this section.
Feature
Classification
Regression
Main goal
Predict a category
Predict a numerical value
Main question
Which class?
How much/how many?
Output
Discrete category
Numerical value
Spam detection
Spam / Not Spam
—
Image recognition
Cat / Dog
—
Fraud detection
Fraud / Legitimate
—
House-price prediction
—
$385,000
Delivery-time prediction
—
32 minutes
Sales forecasting
—
$46,500
Typical examples
Labels/classes
Prices, amounts, quantities
If you remember only one thing from this entire section, remember:
Classification = Which one?
Regression = How much?
That simple question can help you identify many supervised learning problems.
A Simple Everyday Comparison
Imagine an online food-ordering app.
The company wants to solve two problems.
Problem 1
Predict whether a customer will cancel an order.
Possible output:
Cancel
or
Not Cancel
That is:
Classification
Problem 2
Predict how long the order will take to arrive.
Possible output:
28 minutes
That is:
Regression
Same company.
Same general machine learning approach.
Different prediction target.
That is why defining the target is so important.
How to Tell Whether a Problem Is Classification or Regression
Ask:
Is the answer a category?
Examples:
Spam
Cat
Fraud
Positive
Cancelled
Then it is probably:
Classification
Is the answer a numerical amount?
Examples:
$420,000
28 minutes
35°C
1,250 units
Then it is probably:
Regression
Common Classification Algorithms
You do not need to learn the mathematics yet, but it is useful to recognize some common names.
Classification algorithms can include:
Logistic Regression
Decision Trees
Random Forest
K-Nearest Neighbors
Support Vector Machines
Neural Networks
Different algorithms learn decision boundaries in different ways.
We will cover those separately in your Machine Learning Algorithms cluster rather than making this beginner article unnecessarily complicated.
Common Regression Algorithms
Common regression methods include:
Linear Regression
Decision Tree Regression
Random Forest Regression
Support Vector Regression
K-Nearest Neighbors Regression
Neural Networks
Notice something interesting.
Some model families can be used for both classification and regression.
For example:
Decision Trees
can solve classification problems.
They can also solve regression problems.
The algorithm name alone does not always tell you the task.
The prediction target does.
Why Logistic Regression Confuses Beginners
Here is one machine learning name that causes a lot of confusion:
Logistic Regression
Its name contains the word regression, but it is commonly used for classification.
Suppose a model predicts:
Probability of spam = 0.92
That probability can be converted into:
Spam
So even though logistic regression produces a numerical probability internally, the final task can be classification.
For beginners, remember:
Linear Regression → commonly numerical prediction
Logistic Regression → commonly classification
Do not let the names confuse you.
Classification Probability vs Final Class
Another useful idea is that classification models often do not immediately say:
Spam
Internally, a model may first calculate:
Probability of Spam: 86%
Then the system may use a classification threshold.
For example:
If probability is above 50%:
Spam
If probability is below 50%:
Not Spam
The exact threshold does not always have to be 50%.
It can depend on the application and the cost of different mistakes.
You will explore this more deeply in the future article on Classification in Machine Learning.
Real-Life Examples: Classification or Regression?
Let's test your understanding.
Example 1: Netflix-style content category
Predict:
Comedy / Drama / Action
Answer:
Classification
Example 2: Predict next month's electricity usage
Output:
620 kWh
Answer:
Regression
Example 3: Fraud detection
Output:
Fraud / Legitimate
Answer:
Classification
Example 4: Predict delivery time
Output:
42 minutes
Answer:
Regression
Example 5: Recognize an animal
Output:
Cat
Answer:
Classification
Example 6: Predict sales revenue
Output:
$78,500
Answer:
Regression
Classification and Regression Can Use the Same Data Differently
Here's a useful insight.
The same business dataset could support both classification and regression.
Imagine you have customer information including:
account age
purchases
login activity
subscription plan
support requests
You could ask:
Classification Question
Will this customer cancel their subscription?
Output:
Yes / No
Regression Question
How much will this customer spend next month?
Output:
$86.50
Same customer data.
Different target.
Different machine learning problem.
This shows why one of the first steps in any supervised learning project should be:
Clearly define what you want the model to predict.
Benefits of Classification
Classification is useful because many real-world decisions involve categories.
It can help with tasks such as:
organizing information
recognizing patterns
filtering unwanted content
detecting unusual activity
routing customer requests
categorizing images or documents
But the model is not automatically “right.”
Its predictions need to be evaluated.
We will cover that in Part 3.
Benefits of Regression
Regression is useful when businesses or systems need numerical estimates.
Examples include:
price estimation
demand forecasting
delivery estimates
revenue prediction
resource planning
energy-use forecasting
Regression can provide useful estimates, but the results should not be treated as guaranteed future outcomes.
The model is predicting based on patterns in previous data.
Common Beginner Mistakes
Mistake 1: Thinking Every Number Means Regression
Suppose the classes are:
0 = Not Spam
1 = Spam
Those values are numbers, but they represent categories.
So the task is still:
Classification
The meaning of the output matters more than whether numbers appear in the dataset.
Mistake 2: Confusing Multiclass and Multilabel
Remember:
Multiclass: Choose one from many.
Multilabel: Multiple labels can apply at once.
Mistake 3: Thinking Regression Means Linear Regression
Regression is a type of prediction task.
Linear regression is one method used to solve some regression problems.
They are not the same thing.
Mistake 4: Thinking Classification Is Always Yes/No
Binary classification has two classes.
But classification can also have many categories.
For example:
Cat / Dog / Horse / Bird
is still classification.
Mistake 5: Choosing the Algorithm Before Defining the Output
Do not begin with:
“I want to use Random Forest.”
Begin with:
“What exactly am I trying to predict?”
Then decide:
Category → Classification
or
Number → Regression
Only after that should you think about algorithms.
Quick Classification vs Regression Summary
Classification
Predicts categories.
Examples:
Spam / Not Spam
Fraud / Legitimate
Cat / Dog
Positive / Negative
Regression
Predicts numerical values.
Examples:
House price
Delivery time
Sales amount
Energy usage
Memory Rule
Classification asks: “Which class?”
Regression asks: “How much?”
Part 2 Key Takeaways
Before continuing to Part 3, make sure you can explain these points:
Classification predicts categories
Regression predicts numerical values
Binary classification has two possible classes
Multiclass classification selects one class from several possibilities
Multilabel classification can assign several labels to one example
Spam detection is a classification problem
House-price prediction is a regression problem
Logistic regression is commonly used for classification
The same algorithm family may sometimes support both classification and regression
Always define the prediction target before choosing an algorithm
If all of that makes sense, you now understand the two main problem types in supervised learning.
Transition to Part 3
At this point, our model can make predictions.
But there is one very important question left:
How do we know whether those predictions are actually good?
A model might have:
90% accuracy
But is that always impressive?
What if it performs well during training but fails on new data?
How do we measure regression errors?
And what happens after the model is deployed?
That is what we will cover next:
Part 3: How Supervised Learning Models Are Evaluated and Improved
Continue Learning
Build your understanding with these related beginner guides:
Part 1: What Is Supervised Learning and How Does It Work?
Part 3: Supervised Learning Model Evaluation: Accuracy, Precision, Recall, F1 & Error Metrics
Part 1: What Is Regression in Machine Learning and How Does It Work?
Written and reviewed by Hina Majeed. Last updated August 15, 2026.
Tags:
Classification