ModelRefs / Supervised Learning — Tutorial
Supervised Learning — Tutorial
Learn how labeled data trains models to predict unseen examples. Covers Labels are the supervision, The train-test split, The three-way split and data leakage.
Overview
Learn how labeled data trains models to predict unseen examples
Level: Beginner. Estimated reading time: 15 minutes.
Labels are the supervision
Supervised learning trains a model on input-output pairs (X, y). The model learns a function f such that f(X) ≈ y. 'Supervised' refers to the training signal — human-provided labels that tell the model when it is wrong.
Examples: email (X) → spam/not-spam (y), house features (X) → price (y), image (X) → object class (y). Every prediction task where you have historical outcomes is a supervised problem.
The train-test split
Never evaluate a model on the data it trained on — it may have memorised examples rather than learned patterns. Split your data: typically 80% for training, 20% for held-out testing.
The test set simulates deployment: unseen data the model must generalise to. If test accuracy is much lower than training accuracy, the model is overfitting.
The three-way split and data leakage
A proper setup uses train / validation / test. Validation drives hyperparameter tuning during development; test is used only once at the end. Never tune on the test set — doing so leaks information and gives an over-optimistic estimate of real-world performance.
Data leakage is when information from outside the training set reaches the model during training. Common sources: scaling using statistics from the full dataset (before splitting), including future data in features for time-series.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Supervised Learning — Tutorial.