Single-label Classification#
Tasks where each instance is assigned exactly one label.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
In single-label classification every sample is assigned exactly one label from a set of \(K\) mutually exclusive classes. Formally the classifier maps an input to one label,
and typically picks the highest-probability class,
This is the most common classification setting: spam vs not-spam, an image that is a cat or a dog or a horse (never two at once), a single diagnosis from mutually exclusive outcomes.
How it’s modelled#
The output layer is a softmax, so the predicted class probabilities sum to one and the classes compete — raising one lowers the others. Training uses categorical cross-entropy.
How it’s scored#
Because there is one prediction per sample, the natural metrics are accuracy plus precision, recall and F1 (with micro / macro / weighted averaging for the multi-class case) and AUROC / AUPRC via one-vs-rest. A useful identity: under single-label evaluation, micro precision, recall and F1 all equal accuracy.
vs multi-label#
The contrast is exclusivity. Single-label gives one label per sample (an image is cat or dog); multi-label allows any subset (a news story tagged politics and economy), uses independent sigmoids instead of a softmax, and needs set-based metrics like Hamming loss and Jaccard.
Pitfalls and edge cases#
The exclusivity assumption — if samples can truly belong to several classes, forcing one label loses information; use multi-label instead.
Calibrated probabilities —
argmaxdiscards confidence; keep the softmax scores if you need ranking, thresholds or AUROC.Imbalance — plain accuracy flatters a majority-heavy dataset; prefer macro metrics when minority classes matter.
Theme: Classification & Averaging Metrics · All terminology
Hint
Mind map — connected ideas
Multi-label Classification · Micro F1 · Macro F1 · One-vs-Rest (OvR) AUROC
Hint
More in Classification & Averaging Metrics
Accuracy · AUC (Area Under the Curve) · Average Precision (AP) · Binary Classification · Classification Probability · Discriminatory Power · F1-score · Gini Coefficient · Harmonic Mean · Log Loss (also called Logarithmic Loss or Cross-Entropy Loss) · Macro AUC · Macro AUROC (Macro-Averaged AUROC) · Macro Averaging · Macro F1
See also
Source article Adapted (context, re-expressed) in our own words from: Single-label Classification (insightful-data-lab.com).