EXPLAINER

Supervised Learning

conceptfreshness: stablesources not yet verified

Supervised learning trains a model on labelled examples — inputs paired with the right answers — so it can predict answers for new inputs.

Short answer: Supervised learning = learn from labelled examples. Classification predicts categories; regression predicts numbers. Quality depends on label quality, representative data and honest held-out evaluation.

What is it?

You show a model many examples that already have the right answer — emails marked spam or not, houses with their sale prices — and it learns a rule that predicts the answer for new cases. "Supervised" refers to the answers acting as a teacher.

Also known as: supervised machine learning, classification and regression, labelled data learning, learning from labels, predictive modelling.

Technical definition

Given a dataset of pairs (x, y) drawn from an unknown distribution, supervised learning fits a function f_θ by minimising an empirical loss (cross-entropy for classification, squared error for regression, etc.) plus optional regularisation, aiming to minimise expected loss on unseen data. Evaluation uses held-out validation and test splits; cross-validation helps with small datasets. Failure modes include label noise, distribution shift and leakage between train and test.

Entity type: concept · Freshness class: stable.

When should I use it?

Use when you have (or can obtain) reliable labelled examples and a clear prediction target.

Implementation patterns

  • Split data into train / validation / test before any preprocessing that learns from data.
  • Start with a simple baseline (linear model, tree) before a neural network.
  • Track metrics suited to the problem (precision/recall for imbalance).
  • Use cross-validation for small datasets.

Technologies and frameworks

Commonly associated: scikit-learn, PyTorch, XGBoost / gradient boosting, pandas. Names are examples of what exists, not recommendations, and projects change quickly.

Practical guide

  1. Define the target and the metric.
  2. Collect and clean labelled data; audit labels.
  3. Split before preprocessing.
  4. Train a baseline, then iterate.
  5. Evaluate once on the held-out test set; monitor after launch (Model Drift and Production Monitoring).

Common failure modes

  • Data leakage: information from the test set influences training.
  • Label noise or inconsistent labelling.
  • Class imbalance hidden by accuracy.
  • Training data not representative of production inputs.

Troubleshooting

  • Great test score, poor production results — Check leakage and distribution shift between test and production data.
  • Accuracy high but rare class missed — Use precision/recall/F1, resampling or class weights.
  • Unstable results — Use cross-validation and fix random seeds for comparison.

Contrasted with

Questions this page answers

  • What is supervised learning?
  • What is the difference between classification and regression?
  • What is the difference between supervised and unsupervised learning?
  • How do I split data for training and testing?

Typical goals: understand the basic ML setup; choose between supervised and unsupervised learning; avoid train/test leakage.

Sources and verification

Status: not independently verified. This entry was authored on 2026-10-06 from general technical knowledge, without live checking of the sources below. Treat every source as a lead to confirm (identifier, title, authorship, current version) before publication or citation.

Freshness class: stable — Core ideas that change slowly (maths, classic algorithms). Re-review yearly.

Canonical sources (unverified leads):

  • Hastie, Tibshirani & Friedman, The Elements of Statistical Learning (2nd ed.) — hastie.su.domains/ElemStatLearn
  • Bishop, Pattern Recognition and Machine Learning (2006) — locator to be identified
  • scikit-learn user guide — scikit-learn.org
Learning path: Machine learning foundations (step 1 of 9)