MMOOZZGG.com

Glossary

What is classification in machine learning

In short

Classification in machine learning is a task in which a model assigns an object to one of the classes known in advance: spam or not spam, complaint or question, defect or normal item.

Machine learning · classification

MMOOZZGG.com editorsChecked: 1 min read

For a child

Imagine that after cleaning up you have to put toys into boxes: cars in the blue one, blocks in the red one, soft animals in the yellow one. You look at a toy and decide where it goes. A computer can do the same with emails, photos and sounds. People make up the boxes in advance, and the computer only picks the right one.

In plain words

A model is shown many examples where the answer is already known: this email is spam, and this one is not. It notices which features appear more often in each option, such as suspicious links or a shout of “urgent, you have won”. Then the model gets a new email, picks the option by itself and often reports how sure it is. There can be two options, as in a mail filter, or dozens, as in a request categorizer. Sometimes one object fits several labels at once: a review complains about both delivery and packaging.

For business

Companies meet such tasks all the time: sorting incoming requests by department, flagging urgent requests, finding defects in photos from the production line, assessing the risk that an invoice goes unpaid. A model saves time where a person spends the whole day putting similar objects into the same folders. The price depends on whether a labeled history exists, how many classes there are and how costly an error is. A ready language model often handles categorization without training, from an instruction with a few examples. The main risk lies in rare but important classes: a model may almost never notice a claim that threatens a lawsuit. So quality is checked for each class separately and tested on real requests during a pilot.

For a specialist

Classification is a supervised learning task in which a model maps an object to a label from a finite set. There are binary, multiclass and multilabel setups. Classic algorithms: logistic regression, the support vector machine (SVM), decision trees, random forest, gradient boosting and the naive Bayes classifier. A neural network outputs a vector of logits, softmax or a sigmoid turns them into probabilities, and the class is chosen by the maximum or by a threshold. Training usually uses cross-entropy. Quality is measured with precision and recall, the F1 score, ROC-AUC and the confusion matrix; with imbalanced classes, the share of correct answers (accuracy) misleads. For text, teams now often take a fine-tuned transformer or a language model with an instruction and no training examples (zero-shot). The scikit-learn guide describes the algorithms and their implementations.

Example

A support team receives hundreds of emails a day. A model reads each one and adds a label: return, delivery, payment or product question. The email goes straight to the right employee, and urgent ones rise to the top of the queue.

Related terms

Questions and answers

What is classification in AI? It is a task in which AI picks one answer for an object from a list set in advance. For example, it decides which department a request goes to, or whether a photo shows a defect.
How does classification differ from clustering? In classification, the classes are known in advance and there are examples with correct answers. Clustering finds groups of similar objects by itself, with no ready labels, and a person then explains what the groups mean.

Sources

Where companies use it

Not sure whether your company needs this?

AI solutions map
Contact us