What is a label in machine learning?
In one line
Ages 8 to 10: A label is the answer sticker on an example, and a machine uses those stickers to learn what each kind of thing is.
Ages 11 to 13: In a table of training data, the label is the column the model learns to predict from the other columns, which are called features.
Ages 14 to 18: Labels, also called targets or ground truth, define what a model is rewarded for, so unclear labeling rules and label errors flow straight into the model and its test scores.
A label in machine learning is the right answer attached to an example, such as "cat" on a photo of a cat or "spam" on a junk email. Models learn by comparing their guesses with labels. Labels are often added by people, so they can contain mistakes and differences of opinion.
Last reviewed: 20 October 2026 6 min read
The idea in one picture
Imagine a box of photos, each with a sticky note on the back saying what it shows. A model looks at the photo, makes a guess, then turns it over to check the sticky note. The sticky note is the label.
Labels need rules. Two people label the same 10 food photos as "fruit" or "vegetable". They agree on 8. They disagree on two: the tomato and the pepper. A botanist calls both fruit; a cook often calls them vegetables. Agreement is 8 of 10, or 80%. Until the team writes a rule, the model will learn from whichever answer each photo happened to get.
How it works, step by step
- Choose the label set. Decide the possible answers, such as "fruit" and "vegetable".
- Write a labeling guide that settles hard cases, such as tomatoes.
- Label the examples. People, or existing records, give each example its answer.
- Check the labels. Have several people label the same examples and compare.
- Train. The model learns to predict the label from the other information, the features.
- Test with correct labels. The test score is only as trustworthy as the test labels.
A little deeper (ages 11 to 13)
In a data table, each row is one example. Most columns are features, facts about the example such as weight or color. One column is the label, the answer the model must learn to predict. The model sees the features and guesses the label; training compares its guesses with the real labels.
Learning from labeled examples is called supervised learning. When there are no labels, the computer can only look for structure, such as groups of similar examples, which is called unsupervised learning.
Going further (ages 14 to 18)
Machine-learning writing uses several names for the label: target, ground truth, outcome or response. "Ground truth" sounds certain, but labels are judgments. Researchers who checked the test sets of ten widely used datasets found label errors in all of them, and correcting the labels can change which model looks best.
Labels also carry values. If past decisions were unfair, labels copied from those decisions teach the model to repeat them. And a label can stand in for something that is hard to measure, such as using "was hired" as a label for "would be good at the job". The model then learns to predict the stand-in, not the thing people care about. Good practice documents who labeled the data, with what instructions, and how disagreements were settled.
Common mix-ups
- Mix-up: "A label is a feature."Fact: Features are the information the model uses; the label is the answer it predicts.
- Mix-up: "Labeled data is always correct."Fact: Even well-known test sets contain wrong labels.
- Mix-up: "Labels are the categories the model outputs."Fact: Output categories use the same names, but a label is the known answer on a training or test example.
- Mix-up: "Labeling people is what this means."Fact: In machine learning, a label is an answer attached to an example, not a description of a person.
Try it (no device, 5 minutes)
Gather 8 objects from around the room. Two people, without talking, each label every object "toy" or "tool" on scraps of paper. Compare. Where did you disagree? Write a one-sentence rule that settles the disagreement, then label again. Did the rule make you agree more?
Quick check
In a table of fruit with columns for weight, color and "apple or banana", which column is the label?
Answer: "Apple or banana". Weight and color are features.
"Apple or banana". Weight and color are features.Two labelers agree on 9 of 10 photos. What is their agreement as a percentage?
Answer: 9 ÷ 10 = 90%.
9 ÷ 10 = 90%.Why can a wrong test label mislead you even if the model is fine?
Answer: The model's correct answer is marked wrong, so the test score drops, and comparisons between models can flip.
The model's correct answer is marked wrong, so the test score drops, and comparisons between models can flip.Questions
A label is the right answer attached to an example, such as "cat" on a cat photo. A model learns by comparing its guesses with these answers.
Features are the facts about an example that the model can use, such as size or color. The label is the answer the model is trying to predict from those features.
Labels often come from people who look at each example and choose an answer, following written instructions. Some come from existing records, such as a sale price or a diagnosis that was already made.
Yes. Researchers have found wrong labels in the test sets of widely used datasets, and people can disagree on hard cases. Checking labels and writing clear labeling rules reduces errors.
Labeled data is a set of examples that each come with their right answer. It is what supervised learning needs to train a model.
Mechna Academy is a city of machines for curious children aged 8 to 18, opening first to ages 8 to 10. In each mission, a child guesses how a machine decides, then opens its Peek Hatch to check, changes one thing and tests it on a case it has never seen. Children learn how AI works this way, and they never chat with an AI.
For grown-ups: join the waitlistPlaces are limited. The waitlist is for parents and guardians 18 and older.