What is supervised learning?
In one line
Ages 8 to 10: Supervised learning is learning from examples that come with the answers, like practicing with flashcards before trying new ones.
Ages 11 to 13: Each example has input features and a label, and the model adjusts itself until its predictions match the labels, then is tested on held-back examples.
Ages 14 to 18: Supervised learning fits a function from inputs to known targets, called classification when the target is a category and regression when it is a number, and is judged on unseen data.
Supervised learning is a way of training an AI model with examples that already have the right answer attached. The model studies pairs like "this photo: cat" and learns a rule that links inputs to answers, so it can predict the answer for new examples it has never seen.
Last reviewed: 20 October 2026 6 min read
The idea in one picture
Think of flashcards with the answer on the back. You practice with the answers showing, then a friend tests you with new cards. Supervised learning works the same way: the "supervision" is the answers, which are called labels.
A tiny worked example. A machine sorts fruit into grapes and apples by weight. Its labeled examples:
| Weight (g) | Label |
|---|---|
| 5, 6, 8 | grape |
| 150, 180, 200 | apple |
Every grape is 8 g or less and every apple is 150 g or more, so a rule such as "under 50 g means grape" fits all six examples. A new fruit weighs 7 g, and the model says "grape". Any line between 8 and 150 would fit these examples; more examples near the middle would show where the line really belongs.
How it works, step by step
- Collect labeled examples. Each one has inputs, called features, and the right answer, its label.
- Hold some back. Put a test set aside before training.
- Guess. The model makes a prediction for each training example.
- Compare and adjust. A loss measures how far the guesses are from the labels, and the model changes its numbers to make the loss smaller.
- Repeat until the guesses on the training examples stop improving much.
- Test. Run the model on the held-back examples and count its mistakes.
A little deeper (ages 11 to 13)
There are two main kinds of supervised learning. Classification predicts a category, such as grape or apple, spam or not spam. Regression predicts a number, such as the price of a bike or tomorrow's temperature.
The test result is a count. If a model labels 18 of 20 test fruits correctly, its accuracy is 18 ÷ 20 = 90%. Is that good? Compare it with a lazy baseline that always says the most common answer. If 12 of the 20 test fruits are apples, "always apple" already scores 12 ÷ 20 = 60%, so the model should clearly beat 60% to be worth anything.
Going further (ages 14 to 18)
The goal is not to fit the training examples but to generalize: to do well on examples the model has not seen. A model that fits its training set closely and fails on new data is overfitting, which is why the test set must stay untouched until the end.
Labels are the expensive part. Someone has to provide the right answer for every training example, and labels can be wrong, even in well-known test sets. In unsupervised learning, by contrast, no labels are used, and the model looks for structure on its own, such as groups of similar examples. A supervised model also learns exactly what its labels reward: if the labels carry a past bias, the model can learn that too.
Common mix-ups
- Mix-up: "Supervised means a person watches the model learn."Fact: It means each training example comes with its correct answer, the label.
- Mix-up: "Perfect on the training examples means it works."Fact: Only a test on held-back examples shows that.
- Mix-up: "The labels are always right."Fact: Labels come from people or records, and they can contain mistakes.
- Mix-up: "Unsupervised learning is just worse supervised learning."Fact: They solve different tasks: with labels and without.
Try it (no device, 5 minutes)
One person invents a secret rule for numbers, such as "yes if it is even and bigger than 10". They call out six numbers with their labels: "14, yes. 7, no. 22, yes. 8, no…". The learner writes them down and states a rule. Then the rule-maker calls out three new numbers without labels, and the learner predicts each one. How many were right? Which extra example would have helped most?
Quick check
Using the rule "under 50 g means grape", what does the model say about a 160 g fruit?
Answer: Apple, because 160 g is not under 50 g.
Apple, because 160 g is not under 50 g.Is "predict tomorrow's temperature" classification or regression?
Answer: Regression, because the answer is a number, not a category.
Regression, because the answer is a number, not a category.A model scores 70% on a test where "always say the most common answer" scores 75%. Is it useful?
Answer: Not as it stands. It does worse than a lazy baseline, so it has not learned anything useful yet.
Not as it stands. It does worse than a lazy baseline, so it has not learned anything useful yet.Questions
Supervised learning means teaching a computer with examples that already have the right answers. The computer finds a rule that links each example to its answer, then uses that rule on new examples.
A spam filter trained on messages marked "spam" or "not spam" is supervised learning. So is a model that learns to predict a house's price from past sales where the price is known.
Supervised learning uses examples with labels, the right answers. Unsupervised learning has no labels and looks for structure in the data by itself, such as groups of similar examples.
They are the two main kinds of supervised learning. Classification predicts a category, such as cat or dog; regression predicts a number, such as a price or a temperature.
A model can fit its training examples well and still fail on new ones. Testing on examples it never saw while learning is the only fair way to check that it works.
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.