Classification
Classification assigns each input to a discrete category through supervised learning, unlike regression, which predicts a number. We distinguish its types (binary, multiclass and multilabel), the real range of algorithms, and how it is evaluated when classes are imbalanced.
Classification is a supervised-learning task in which a model learns, from labeled examples, to assign each input to one of a finite set of categories or classes. It differs from regression, whose output is a continuous number rather than a category.
Types of classification
Three types are worth distinguishing. Binary has two mutually exclusive classes, such as “spam” or “not spam.” Multiclass has more than two, but each example gets only one: a handwritten digit is a 7 and not at the same time a 3. And multilabel allows assigning several labels—or none—to the same example, because they are not exclusive: an image may contain both “dog” and “cat.”
Algorithms
There are no few canonical “pillars,” but a range of algorithms chosen according to the problem: logistic regression, k-nearest neighbors, decision trees and random forests, support vector machines, naive Bayes, gradient boosting and neural networks. A clarification is in order: generative adversarial networks (GANs) are not classifiers, but generative models; their relation to classification is indirect, as a tool for augmenting the training data.
How it is evaluated
The most intuitive metric is accuracy (the proportion of correct predictions), but it misleads with imbalanced classes: if 99% of cases belong to one class, always predicting that class is right 99% of the time without being useful. That is why precision, recall and their harmonic mean, the F1 score, are used, along with the confusion matrix and the area under the ROC curve, which give a truer picture when the classes are not balanced.
Pieces using this term
- EFE and Soria Noticias show two newsroom uses for AI (2026-07-28)
- What an AI "hallucination" means and how to check each kind of failure (2026-07-27)
- Madrid funds health AI and remote monitoring: an agreement is not yet a clinical service (2026-07-25)
- Context for coding agents: what to document and how to test it (2026-07-23)
- Morgan State transforms its cloud computing degree into an AI degree (2026-07-22)
- Torrejón tests AI to read safety patterns, not to watch people (2026-07-22)
- An SVM-based AI text detector shows why context matters (2026-07-22)
- Patreon stops relying on robots.txt alone to curb AI scraping (2026-07-22)
This article was produced with artificial intelligence under human editorial oversight.