Classification is a type of supervised machine learning in which a model learns from labelled examples to predict a discrete category for new inputs. With two categories it is binary classification; with more it is multiclass; when an input can have several labels at once it is multilabel.
Why it matters
Many practical problems are classification: spam filtering, fraud flags, ticket routing, image recognition and sentiment analysis. How you measure success matters. Accuracy can be misleading when classes are imbalanced, so precision, recall and F1 score are commonly reported instead, and the cost of false positives versus false negatives should drive the threshold you pick.
Example
Fraud detection: 1,000 transactions, 10 fraudulent
A model that always says "legitimate" is 99% accurate
but catches 0 of 10 frauds (recall = 0%).
This is why accuracy alone can hide a useless model.
Common mistakes
- Judging imbalanced problems by accuracy alone.
- Leaking test data into training, which inflates results.
- Confusing it with regression, which predicts a continuous number, and with clustering, which has no labels.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.