
Classification is a machine learning task where a model assigns input data to one of several predefined categories. It is one of the most common types of supervised learning.
What it means in plain English
In classification, the possible answers are known categories, and the model’s job is to pick the right one for each input. It can be binary (two categories, like spam/not-spam) or multi-class (many categories). The model learns from labelled examples what distinguishes each category, then applies that to new data. Classification answers “which category does this belong to?”
It contrasts with regression, which predicts a continuous number rather than a category.
A simple example
An email filter performs classification, sorting each message into “spam” or “not spam.” A photo app classifying images as “cat,” “dog,” or “bird” is doing multi-class classification.
Why it matters
Classification is behind a huge range of everyday AI — spam filters, medical screening, content moderation, sentiment analysis. Understanding it clarifies one of the two fundamental kinds of prediction tasks in machine learning.
Related terms
- Regression — predicting a number instead of a category.
- Supervised Learning — the category classification belongs to.
- Confusion Matrix — a way to measure classification accuracy.
Frequently asked questions
What is an example of classification?
Sorting emails into “spam” or “not spam,” identifying whether an image contains a cat or a dog, or labelling a review as positive or negative sentiment are all classification tasks.
How is classification different from regression?
Classification predicts a category or label (a discrete choice), while regression predicts a continuous number, such as a price or temperature.