# Classification

> Canonical: https://skillalmanac.com/glossary/classification | Verification status: pending | Index status: not offered to search engines

Classification in machine learning is the task of predicting which of a set of classes, or categories, an example belongs to, such as spam or not spam. A model that does this is called a classifier.

Also called: classification machine learning, classification algorithm, classifier, binary classification, text classification, multiclass classification.

## In plain language

Classification predicts categories, such as spam versus not spam. In a conventional supervised classifier, labeled training examples help fit the decision rule. Other setups exist: a zero-shot model such as CLIP can classify against supplied text descriptions without task-specific labeled training examples. The available categories and any rejection option depend on the system. False positives and false negatives can have different consequences, so choose evaluation criteria for the actual use.

## Technical definition

Google's crash course defines classification as the task of predicting which of a set of classes (categories) an example belongs to, and describes turning a logistic regression model that predicts a probability into a binary classification model that predicts one of two classes by choosing a threshold. IBM distinguishes binary classification, which sorts data into two exclusive categories, multiclass classification, with more than two mutually exclusive labels, and multilabel classification, where multiple nonexclusive labels can be assigned to each data point. Supervised classifiers are fitted to labeled examples. Classification also includes zero-shot setups, where a pretrained model can use supplied class descriptions without fitting to labeled examples from the target task. The scikit-learn user guide lists many classifier families, including nearest neighbours, support vector machines, decision trees and ensembles.

## How it shows up when you use agents

Classification is the job behind many requests you may hand to an agent: tag these support tickets, route this email, flag these transactions, label this text as positive or negative. There are several ways to do it. A trained classifier learns from labelled examples (see [supervised learning](/glossary/supervised-learning)). A rule-based approach uses conditions someone wrote down. A large language model prompted to pick a label is a third route, which is [prompt](/glossary/prompt)-driven and needs no training.

What breaks when this is misunderstood: people report accuracy on a test set that shares rows with the training data, or on data where one class is rare, and trust a number that says little. A classifier can also be confidently wrong on an item unlike anything it saw.

The safer habit is to ask the agent which approach it used, how many examples each class has, how it kept test data apart, and which kinds of mistakes it counted. For a task with clear, stable rules, such as categorising bank rows by merchant keyword, a rule-based skill is easy to read and audit. See [sentiment analysis](/glossary/sentiment-analysis) for a common classification task on text.

## Common confusions

- **Classification versus regression.** Classification predicts a category. Regression predicts a number, such as a price. Some methods, including decision trees, do both.
- **Classifier versus classification.** The task is classification. A classifier is the model, or the algorithm and settings, that performs it. See [machine learning algorithm](/glossary/machine-learning-algorithm).
- **Binary versus multiclass versus multilabel.** IBM describes binary as two exclusive categories, multiclass as more than two exclusive labels, and multilabel as nonexclusive labels where one item can carry several.
- **Rules versus a trained classifier.** Both sort items into classes. Rules are written by a person and behave the same way each time. A trained classifier learns patterns from labelled data and can generalise or fail in ways that are harder to predict.

## Worked examples in this catalogue

### [expense-categorizer-rules](https://skillalmanac.com/skills/skill-almanac/expense-categorizer-rules)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A bank transactions CSV categorised with ordered keyword rules where the first match wins, with totals per category and the uncategorized rows reported.

Why it exercises the concept: A rule-based contrast case, not a trained model. It sorts rows into categories, which is a classification task, but a person wrote the rules. A trained classifier would learn its own from labelled examples. The catalogue has no training skills.

### [split-leakage-check](https://skillalmanac.com/skills/skill-almanac/split-leakage-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A JSON report on train, validation and test files that flags duplicates, shared groups, time leakage and label leakage between the splits.

Why it exercises the concept: Not a training skill. A classifier is judged on held-out labelled examples, and a leak between splits makes the score look better than the model is.

### [data-analysis-eda](https://skillalmanac.com/skills/skill-almanac/data-analysis-eda)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.

Why it exercises the concept: Not a training skill. Profiling a labelled table shows how many rows each class has before anyone trains on it, and this is the first check on a classification problem.

## Related terms

- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Machine learning algorithm](https://skillalmanac.com/glossary/machine-learning-algorithm.md)
- [Overfitting](https://skillalmanac.com/glossary/overfitting.md)
- [Sentiment analysis](https://skillalmanac.com/glossary/sentiment-analysis.md)
- [Named entity recognition (NER)](https://skillalmanac.com/glossary/named-entity-recognition.md)
- [ROC curve and AUC](https://skillalmanac.com/glossary/roc-auc.md)
- [Precision and recall](https://skillalmanac.com/glossary/precision-and-recall.md)

## Sources

- [Classification](https://developers.google.com/machine-learning/crash-course/classification), Google for Developers (Machine Learning Crash Course) (accessed 2026-11-24)
- [What is classification in machine learning?](https://www.ibm.com/think/topics/classification-machine-learning), IBM (accessed 2026-11-24)
- [Supervised learning](https://scikit-learn.org/stable/supervised_learning.html), scikit-learn user guide (accessed 2026-11-24)
- [CLIP: Connecting text and images](https://openai.com/index/clip/), OpenAI (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above. Independent source and example-target verification is pending. [Glossary index](https://skillalmanac.com/glossary.md).
