AI Glossary / AI and machine learning / Beginner
Class
Definition
In classification, a class is one of the categories a model can assign to an item, such as spam, billing or delivery for incoming emails.
What it means
The set of classes defines the problem. A model that sorts tickets into billing, delivery and technical knows exactly three answers, and the choice of those three is a business decision made before any training.
Classes are the targets the model learns to tell apart. Every training example carries one, and the model's whole job is to guess the right class for new items.
Class balance matters. If 95 percent of examples are billing, the model sees little of the other classes and will be weak exactly where data is scarce.
A model outputs a score per class, and the highest score wins. The gap between the top scores is a rough read on confidence, which is why low-margin predictions often go to a human queue.
For a business, designing the class set is designing the work: each class should map to an action, a team or a decision, or the model sorts items into buckets nobody uses.
Class names leak into the product: users see queues, folders and dashboards named after classes, so ambiguous names create confusion far beyond the model.
There is a hierarchy option too. Large systems often use coarse classes first, then fine classes inside them, such as delivery split into late, lost and damaged.
How it works
Define the classes with the people who will act on them, and write inclusion rules so labelers draw the boundaries the same way.
Label examples per class, aiming for enough of the rarest class that the model can learn it; hundreds per class is a common starting point.
Train the model to output a score per class, and predict the highest-scoring one, or hold the item for review when the scores are too close to call.
Measure performance per class, not just overall. A model can be brilliant on the big classes and blind on the small one you care about most.
Adding or merging classes later means new labels and retraining, so design the set with some care at the start.
The review queue deserves design as well: what confidence gap triggers it, who clears it, and how its corrections flow back as fresh labels. That loop is where the model keeps learning.
Three practical examples
- Support inboxes: billing, delivery, technical, account, other, each routed to its own queue.
- Sentiment: positive, neutral, negative, for reviews and survey comments.
- Manufacturing: photos of products classed as pass, cosmetic defect or critical defect.
Think of it this way
Think of pigeonholes in an old post office. The sorter's whole skill is picking the right hole for each letter. The holes were chosen by the postmaster, not by the sorter.
The limit: a letter that fits no hole, or two holes equally, exposes a design problem in the pigeonholes, not just a sorting problem.
Worked example
adding a refund class to a ticket router
Suppose a firm's router sorts tickets into three classes, and refund requests keep landing in billing, where they wait behind routine queries.
The team adds a refund class, labels 300 past refund tickets, and retrains. Routing accuracy on the new class is lower at first, because it has the least data. The numbers are illustrative.
They collect more labeled refunds for a month, and the class catches up.
The lesson: classes are cheap to invent and expensive to teach, so the class list deserves thought before the first label is placed.
Illustrative case study
A fictional insurer's claims triage model confuses theft and accidental damage, because adjusters had labeled borderline cases both ways over the years.
The firm runs a labeling workshop, writes boundary rules with examples, relabels the disputed slice, and merges two near-identical classes. Model confusion drops because the human confusion dropped.
The invented lesson: class design and labeling consistency are upstream of every accuracy figure. A model cannot be clearer than its labels.
The insurer keeps a standing rule that any class change goes through the claims team first, because a model retrained on a new class set changes every downstream report.
Common misconceptions and mistakes
- The model discovers the classes. In classification, people define classes in advance; discovery of groups is clustering, a different task.
- A class is the same as a cluster. Classes are assigned targets; clusters are found structure, and the two need not match.
- More classes mean a better system. Each extra class adds labeling cost and confusion risk, so classes should earn their place.
Business use
Design classes around actions: if nobody would treat two classes differently, merge them before training.
Review per-class results in every report, and fund labeling for the rare classes that matter, not just the common ones.
When a vendor demo shows classes that match their slides rather than your operations, treat class design as project work you own, not a detail the tool supplies.
People also ask
Is a class the same as a label?
The class is the category; the label is the class name attached to a particular example.
Can an item belong to two classes?
Not in standard single-label classification; multi-label classification exists for that case.
What is class imbalance?
When some classes have far fewer examples than others, making them harder to learn well.
What is a hierarchical classifier?
One that predicts coarse classes first, then finer classes within them, which keeps rare fine classes easier to learn.
Check your understanding
Who defines the classes in a classification project?
Answer: People do, in advance, based on the actions the business will take; the model only learns to tell the chosen classes apart.
Related terms
Learn next
AI for Business Owners covers how to frame categories and metrics so models serve real decisions: https://aiforbusinessandlife.com/academy/ai-for-business-owners. [C2]
More in AI and machine learning
- Chi-square automatic interaction detection - Chi-square automatic interaction detection, usually called CHAID, is a method for building decision trees.
- Circuit (neural network) - In neural-network interpretability, a circuit is a collection of internal components and connections that work together to produce a particular behavior.
- Circular analysis - Circular analysis occurs when information used to select a pattern also enters the analysis presented as independent evidence for that pattern, without a...
- Class activation mapping - Class activation mapping, or CAM, is a technique that highlights image regions contributing to a particular class score in certain convolutional neural...
- Classification model - A classification model is a model that sorts items into predefined categories, such as spam or not spam, by learning the patterns that separate the classes...
- Classification threshold - A classification threshold is the cut-off that turns a model's probability score into a decision, such as flagging every customer scored 0.7 or higher as a...
Sources
[S2] Google, Machine Learning Glossary. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Clarification Next: Class activation mapping