AI Glossary / AI and machine learning / Beginner
Statistical classification
Definition
Statistical classification is the task of assigning an observation to one or more categories using a model informed by data. The model relates measured features to class labels and applies that relationship to new observations, often with scores or probability estimates that express uncertainty.
What it means
Examples include routing a document by type or identifying whether a manufactured image shows a known defect category. The output is categorical, unlike regression, which typically predicts a numerical quantity.
In supervised classification, training examples include labels that define the categories to be learned. The model's performance depends on how those labels were assigned and whether the training examples represent future inputs.
A binary task has two classes. A multiclass task has several possible classes, often with one selected per observation. A multilabel task permits several labels at once. These setups require different output and evaluation choices.
Classification is an estimate, not a guarantee. A model can be uncertain, face unfamiliar inputs, or reproduce inconsistencies in its labels. The category definitions and the practical consequences of errors are part of the problem, not details to consider only after training.
How it works
Define the classes and the intended use of the prediction. Gather labeled examples and choose features available at the time a real prediction will be made.
Fit a model using a learning procedure appropriate to the data. Logistic regression, trees, nearest-neighbor methods, support vector machines, and neural networks are among the possible approaches.
Convert scores into decisions using a documented rule. For a binary model, a threshold may determine which class is assigned. The best threshold depends on error costs, class prevalence, and the desired workflow, rather than automatically being 0.5.
Evaluate on data excluded from training and model selection. Examine the confusion matrix, relevant per-class measures, and probability calibration when probabilities are used. Monitor changes in data and labeling practices after deployment. Performance measured in one setting may not transfer to a different population or time period.
Three practical examples
1. A document system classifies incoming forms by type so that each reaches the appropriate internal workflow. Unrecognized or uncertain cases can be routed for review.
2. An image classifier distinguishes several known surface-pattern categories in a controlled teaching dataset. Evaluation checks each category rather than reporting only one overall score.
3. A message-tagging tool assigns multiple topic labels to a document. This is a multilabel task because one document can legitimately discuss several subjects.
Think of it this way
Think of sorting a mixed tray of objects into labeled bins using learned clues. Some clues are reliable, while borderline objects may resemble items in more than one bin.
The analogy captures category assignment. Real models can use many numerical features, and the bins themselves may be imperfect human definitions. A confident assignment does not establish that the category is objectively correct or that the model has understood the object as a person would.
Worked example
Suppose a test set contains 100 records, including 20 that require review. A classifier flags 25 records, of which 15 truly require review. It misses the other 5 positive records.
There are 15 true positives, 10 false positives, 5 false negatives, and 70 true negatives. Accuracy is (15 + 70)/100 = 85%. Precision is 15/25 = 60%, and recall is 15/20 = 75%.
Each measure reveals something different. The 85% accuracy does not show how much review effort is wasted or how many important cases are missed. Choosing a threshold should reflect those consequences and be evaluated on separate data, not tuned repeatedly to the final test set.
Illustrative case study
Fictional case: Maple Forms trains a classifier to identify practice documents that need staff review. Its initial report emphasizes overall accuracy, which looks encouraging because most documents do not need review.
The team inspects the confusion matrix and discovers that several important review cases are missed. It revisits the decision threshold, label definitions, and examples used for evaluation.
The final assessment reports missed cases and unnecessary reviews separately. This invented case illustrates evaluation choices. It does not claim a measured business improvement or imply that changing a threshold can solve every underlying data or model problem.
Common misconceptions and mistakes
Do not equate accuracy with complete usefulness, especially when classes are imbalanced. Do not assume a model score is a calibrated probability.
Do not use features created after the outcome as if they were available beforehand. Avoid treating labels as unquestionably correct when reviewers disagree or definitions change. Do not confuse classification with clustering, which groups observations without necessarily using predefined target labels. Finally, distinguish predicting a category from deciding what action should follow that prediction.
Business use
Classification can support routing, screening, organization, and prioritization across many workflows. Its value depends on the cost and benefit of the actions triggered by its outputs.
Define acceptable error behavior before choosing a model. Measure per-class performance, review burden, and outcomes for relevant input groups. Provide a way to handle uncertain or unsupported cases. Keep the prediction model separate from the policy that determines whether a record is acted on automatically, reviewed, or left unchanged.
People also ask
Is classification always binary?
No. Tasks can involve several mutually exclusive classes or multiple simultaneous labels.
Does a probability of 0.8 guarantee correctness eight times out of ten?
Only a well-calibrated model under comparable conditions supports that interpretation across similar predictions; one score alone does not establish calibration.
Is clustering the same task?
No. Clustering seeks groups, while supervised classification learns to predict defined labels from labeled examples.
Check your understanding
A dataset has 95% class A, and a model always predicts A. Is its 95% accuracy enough to show that it solves the task?
Answer: No. It never identifies the other class. Whether that is acceptable depends on the task, and per-class measures reveal the failure hidden by the overall accuracy.
Related terms
- Supervised learning
- Confusion matrix
- Precision
- Recall
- Probability calibration
- regression
- class label
- decision threshold
Learn next
Build a confusion matrix for a small binary example and calculate precision and recall. Then vary the decision threshold and examine the tradeoff. Study calibration separately from classification accuracy so that probability outputs are interpreted appropriately.
More in AI and machine learning
- Stacked generalization - Stacked generalization, often called stacking, combines predictions from several models using another model that learns how to combine them.
- Staged training - Staged training trains a machine-learning model through a planned sequence of distinct phases.
- State - In reinforcement learning and agent systems, a state describes the situation relevant to deciding what happens next.
- Statistical learning theory - Statistical learning theory studies how and when a model learned from finite data can perform well on new observations.
- Statistical relational learning - Statistical relational learning is a family of methods that learn and reason under uncertainty while representing relationships among entities.
- Step size - In optimization, step size controls how far an update moves along a chosen search direction.
Sources
James, Witten, Hastie, Tibshirani, and Taylor, An Introduction to Statistical Learning: https://www.statlearning.com/. Author-maintained framework and classification coverage checked; book download failed during review. scikit-learn authors, Model evaluation: https://scikit-learn.org/stable/modules/model_evaluation.html. Official classification metrics and prediction-versus-decision guidance consulted independently. Original confusion counts and 85% accuracy, 60% precision, 75% recall independently checked; the workflow case is fictional.
Previous: Statistical bias Next: Statistical confidentiality