Classification is used when a machine learning model needs
to decide which category or class a piece of data belongs to.
It is used in many real-world problems.
THE SIMPLEST IDEA
Classification answers: "Which category does this belong to?"
The model looks at the features of an input, learns
patterns from training examples, and then predicts
a category for new data.
01
Example — Spam Email Detection
An email service can use Machine Learning to decide
whether a new email is Spam or
Not Spam.
The model can learn from information such as:
Number of links
Words used in the email
Email length
Sender information
INPUT
Email Data
→
MODEL
Classification
→
OUTPUT
Spam / Not Spam
There are two possible classes, so Spam Detection is a Binary Classification problem.
02
Example — Fraud Detection
Banks and payment systems can use Machine Learning
to determine whether a transaction is
Fraudulent or Not Fraudulent.
The model can learn patterns from information such as:
Transaction amount
Transaction location
Transaction time
Previous transaction behavior
INPUT
Transaction Data
→
MODEL
Classification
→
OUTPUT
Fraud / Not Fraud
Fraud detection is another example of Binary Classification because there are two possible classes.
03
Example — Customer Churn Prediction
A company may want to predict whether a customer is
likely to leave its service.
The model can use information such as:
How long the customer has been subscribed
Number of purchases
Customer activity
Previous support interactions
CUSTOMER DATA
Features
→
MODEL
Classification
→
PREDICTION
Leave / Stay
The model is not predicting the exact number of days
until the customer leaves. It is choosing a category.
"Leave" and "Stay" are two classes, so this is Binary Classification.
04
Example — Image Classification
Machine Learning can also classify images into
different categories.
Suppose a model has learned to recognize:
CLASS
Cat
CLASS
Dog
CLASS
Horse
CLASS
Bird
INPUT
Image
→
MODEL
Image Classification
→
OUTPUT
Dog
If the model can choose between Cat, Dog, Horse,
and Bird, this is a Multi-Class Classification
problem.
05
Example — Sentiment Classification
Classification can also be used to understand
the sentiment of text.
For example, a customer review could be classified
as:
CLASS
Positive
"The product is excellent."
CLASS
Negative
"The product is terrible."
CLASS
Neutral
"The product arrived today."
INPUT
Customer Review
→
MODEL
Text Classification
→
OUTPUT
Positive
With Positive, Negative, and Neutral classes, this is a Multi-Class Classification problem.
06
Example — Handwritten Digit Recognition
A Machine Learning model can look at an image of a
handwritten number and identify which digit it is.
0123456789
INPUT
Handwritten Image
→
MODEL
Digit Classification
→
OUTPUT
7
There are ten possible classes: 0 through 9.
Because there are more than two possible classes, digit recognition is Multi-Class Classification.
07
How to Recognize a Classification Problem
When you see a Machine Learning problem, ask one
simple question: