# Classification (Machine Learning)

> Sorting each case into one of a few known groups, like spam or not spam.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** Classifier, Classification Task

## Think of it like

Think of it like sorting socks into the right drawers. Each sock goes in one drawer.

## Definition

Classification is the machine learning task of putting each example into one of a set of groups. The groups are fixed before training, like spam or not spam, or cat, dog or bird. The model learns from labelled examples of each group. For a new example, it picks the group that fits best. It often gives a chance for each group too.

## Example

Jack's model looks at photos of fruit and says apple, banana or pear. Each photo gets exactly one of those three answers.

## Why it matters

Many real jobs are a choice between known options. Spam, fraud, illness and faults are all classification.

## Common mistake

Judging it only by how often it is right. If 99 in 100 emails are fine, a model that says fine to all scores 99 percent and catches nothing.

## Three principles

- **Known groups.** Set before training.
- **One answer each.** Pick the best fit.
- **Often a chance.** How sure it is for each group.

## Related terms

- [Regression (Machine Learning)](https://learn.benibix.com/term/ai/regression)
- [Supervised Learning](https://learn.benibix.com/term/ai/supervised-learning)
- [Logistic Regression](https://learn.benibix.com/term/ai/logistic-regression)
- [Clustering](https://learn.benibix.com/term/ai/clustering)
- [Sentiment Analysis](https://learn.benibix.com/term/ai/sentiment-analysis)
- [Confusion Matrix](https://learn.benibix.com/term/ai/confusion-matrix)
- [Spam Filter](https://learn.benibix.com/term/ai/spam-filter)

## Told apart from

- [Classification vs Regression](https://learn.benibix.com/compare/classification-vs-regression): People often think regression means going backwards, or that it does the same job as classification. Both predict, but the answers differ. Classification picks one of a few named groups, like spam or not spam. Regression gives a number on a scale, like a price. Ask what shape the answer has, and you know which one you need.
- [Clustering vs Classification](https://learn.benibix.com/compare/clustering-vs-classification): Both put examples into groups, so people mix them up. The difference is who names the groups. In classification you name them first and give labelled examples. In clustering nobody names them, and the model finds groups that you then have to explain.

## Taught in

- [Classification vs Regression](https://learn.benibix.com/learn/ai-machine-learning/classification-vs-regression): Machine Learning, 8/18
- [Spam and Fraud Detection](https://learn.benibix.com/learn/ai-use-case/spam-and-fraud-detection): AI Assistants and Chatbots, 11/13

![Two panels. Classification: dots of two kinds split by a line, with the answer cat or dog. Regression: dots rising from left to right with a trend line, with the answer a price.](https://learn.benibix.com/diagrams/ml-classification-regression.svg)

---

Source: https://learn.benibix.com/term/ai/classification
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
