📏  Multiclass Classification

Multiclass Classification#

Assigning each instance to one of three or more classes.

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#

Multiclass classification predicts one of more than two mutually exclusive classes — a handwritten digit (0–9), a species, a product category. It generalizes binary classification, and its models usually end in a softmax layer that outputs a probability over the K classes.

The evaluation twist#

Metrics built for two classes — ROC-AUC, precision, recall — have no direct multiclass definition, because “positive vs negative” is ambiguous with many classes. To use them, the problem is binarized (one class vs the others) and the per-class scores are averaged.

The two decompositions#

One-vs-Rest turns K classes into K binary problems (each class against the rest); One-vs-One compares every pair. Either produces a set of per-class or per-pair scores that a micro or macro average then collapses into a single number.


Theme: Classification & Averaging Metrics  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Multiclass Classification (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate