Home › Glossary › Fundamentals › Class

Beginner · Fundamentals

Class

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. A category that a label can belong to, such as 'spam' or 'not spam' in an email classification task.

Technical Definition

A category that a label can belong to, such as 'spam' or 'not spam' in an email classification task.

How it works

A class represents a distinct category within a classification problem. For instance, a spam detection model might have two classes: 'spam' and 'not spam'. In a more complex scenario like identifying dog breeds, the classes could be 'poodle', 'beagle', or 'pug'. A classification model's goal is to predict which class an input belongs to, differentiating it from regression models that predict numerical values.

Related Concepts

  • Binary classification — A machine learning task that categorizes input into one of two mutually exclusive classes, like 'spam' or 'not spam'.
  • Classification model — A predictive model that assigns an input to one of several predefined categories or classes.

Further Reading

  • Google ML Glossary