Computing Library › Machine Learning
Machine Learning

Supervised Learning

Supervised learning fits a function from labeled examples so it can predict labels for new, unseen inputs.

What supervision means

In supervised learning each training example is a pair (x, y): an input x (features) and a known target y (label). The learner searches a family of candidate functions for one whose predictions f(x) match the observed y across the training set, then it is judged on inputs it never saw during fitting.

The two dominant sub-problems are classification, where y is a discrete class, and regression, where y is a continuous number. The same core machinery, minimize a loss over a hypothesis class, covers both; only the loss and output layer change.

Kronos motion — lego machine

The learning objective

Training minimizes an empirical risk: the average of a per-example loss L(f(x), y). Squared error suits regression; cross-entropy suits classification. Because minimizing training loss alone invites overfitting, we add regularization and estimate true performance with a held-out set.

Generalization

The goal is never to memorize the training set but to generalize. Performance on a proper test split estimates how the model behaves in deployment. The gap between training and test performance exposes the bias-variance tradeoff at the heart of the field.

Supervised methods power most engineering surrogate models, including reduced-order predictors that emulate expensive fusion plasma simulations so designers can scan parameters quickly before committing to a full physics run.