Skip to content

Classification (Machine Learning)

Also called: classification model, classification models, classifier, classifiers

Published:

How does a classification model decide?

Google defines a classification model simply as one whose prediction is a class [3]. Many such models first output a probability, which a threshold then turns into a class [1]. A logistic regression model might put the chance that an email is spam at 75%; the threshold decides whether that email is labelled spam or not spam [1]. Where the threshold sits changes which mistakes the model makes more often, which is why Google covers threshold choice alongside metrics such as ROC curves and AUC [1].

What kinds are there?

Binary classification sorts data into two exclusive categories, with spam filtering as the textbook case [2]. Multiclass classification has more than two mutually exclusive categories, such as the kind of pet shown in a photo [2]. In multilabel classification a single example can belong to several categories at once [2]. IBM lists logistic regression, decision trees, random forests, support vector machines and k-nearest neighbours among the common methods [2], and uses that range from fraud detection to sentiment analysis and customer churn prediction [2].

How is it different from regression?

Classification predicts a category; regression predicts a continuous number [2]. The two are close relatives: logistic regression borrows regression techniques to do classification [2]. Both belong to supervised learning, where a model is trained on features paired with labels [3].

Frequently asked questions

What is binary classification?

A task where the model chooses between two mutually exclusive classes, such as deciding whether an email is spam.

Why does the threshold matter?

Many classifiers output a probability. The threshold sets the point at which that probability counts as a given class, and so shifts the balance between different kinds of error.

Sources

  1. Classification — Google for Developers (Machine Learning Crash Course)
  2. What is Classification in Machine Learning? — IBM
  3. Machine Learning Glossary: ML Fundamentals — Google for Developers