Machine LearningData Fundamentals

What is a label in machine learning?

A label in machine learning is the known output or category attached to a training example that a supervised model learns to predict.

Labels provide the correct answer for the examples used during training.

Simple example

Suppose we are training a model to detect spam emails.

Each email might have a label such as:

  • Spam
  • Not spam

The model receives the email as input and learns to predict the correct label.

Email features → Label

Labels in classification

The term label is used most often in classification problems, where the output belongs to a category.

Examples include:

  • cat, dog, or bird for image classification
  • fraud or not fraud for transaction detection
  • approved or rejected for an application

Label vs target variable

  • A target variable is the general output a supervised model tries to predict.
  • A label usually refers to a known categorical target assigned to an example.

In practice, the terms are sometimes used interchangeably, especially when discussing supervised learning.

Labeled data

A dataset is called labeled when its training examples include these known outputs.

For example:

Image → cat
Image → dog
Image → cat

Here, cat and dog are the labels.

In short, a label is the known answer attached to a training example that tells a supervised model what output it should learn to predict.

#what is a label in machine learning#machine learning label definition#labels in supervised learning#labeled data machine learning#label vs target variable#machine-learning#labels#supervised-learning#target-variable#labeled-data

Learning Sequence

Machine Learning Curriculum

8% Completed
Up NextMachine Learning

What is the difference between features and labels?

Explore Related Questions

Deepen your understanding across related Machine Learning topics.

Machinoai Logo
Machinoai

Your edge in the AI era. Deep dives into machine learning concepts, paper explainers, verified industry jobs, and developer tools.

© 2026 Machinoai. All rights reserved.