Machine LearningData Fundamentals

What is the difference between features and labels?

The main difference between features and labels is that features are the inputs given to a machine learning model, while labels are the known outputs the model learns to predict in supervised learning.

Features

Features describe the characteristics of each sample.

For example, when predicting house prices, features might include:

  • house size
  • number of bedrooms
  • location
  • age of the property

These values are provided to the model as input.

Labels

A label is the known answer associated with a training example.

For example, in an email spam classifier, the label might be:

  • Spam
  • Not spam

The model learns how the input features relate to these labels.

Key differences

  • Role: Features are inputs; labels are outputs.
  • Purpose: Features provide information for prediction; labels provide the correct answer during supervised training.
  • Availability: Features are present in both training and prediction data. Labels are usually available during training but may be unknown when making a new prediction.
  • Example: In spam detection, words, sender information, and links can be features, while spam or not spam is the label.

A simplified view is:

Features → Model → Predicted label

During training, the predicted label can be compared with the known label so the model can improve.

In short, features describe the input example, while labels represent the answer the supervised model is trying to learn to predict.

#features vs labels machine learning#difference between features and labels#machine learning features and labels#input vs output machine learning#features labels supervised learning#machine-learning#features#labels#supervised-learning#data-fundamentals

Learning Sequence

Machine Learning Curriculum

9% Completed
Up NextMachine Learning

What is a dataset in machine learning?

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.