liveBook · Manning

Supervised learning

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

Supervised learning is a machine-learning paradigm in which a model learns mappings from inputs to labeled target outputs.

Supervised learning uses examples with known outputs to learn a mapping from inputs to outputs. Once trained, the model can predict outputs for new inputs that have no labels. For instance, images labeled by traffic-sign type can train a model to recognize signs it encounters later. section 11.2

The kind of target determines the task:

  • Classification predicts a discrete class, such as a penguin species from bill and body measurements. section 11.2 section 9.7
  • Regression predicts a continuous value. section 11.2

A practical workflow starts with input features and their corresponding targets, chooses a model, and adjusts the model to reduce prediction error. A neural network commonly does this through forward computation, backpropagation, and weight updates using gradient descent. The training method can change without changing the supervised task: a particle swarm optimizer can instead search over the network’s weights and biases, scoring each candidate against labeled examples. section 9.7

Classifying penguins

Use bill length, bill depth, flipper length, and body mass as four inputs to a network with ten hidden units and three species outputs. Encode the species labels, calculate predicted class probabilities, and score candidate weights by their loss on the labeled observations. After training, choose the highest-scoring class for a new observation. In the reported PSO comparison, global-best, local-best, and binary variants achieved different average accuracies; the optimizer choice matters for this setup. section 9.7

Supervision also helps tackle optimization problems when examples of good solutions are available. In a traveling-salesperson workflow, a graph model estimates which nodes or edges belong in a solution, then graph search seeks a feasible tour. Imitation learning reduces the difference between its predictions and optimal tours supplied by a solver such as Concorde. The demonstrated implementation loads a pretrained model rather than training the entire pipeline from scratch. section 11.7

Figure 11.16 End-to-end pipeline for combinatorial optimization problems

Follow the graph-optimization pipeline from problem features through learned predictions to a candidate solution; prediction and search serve different roles. section 11.7

Other outputs can be structured rather than single labels. A pointer network for the convex-hull problem learns to select successive input points; training and validation compare its selections with target point sequences. Test accuracy and hull overlap provide separate ways to check the result. For repeated continuous optimization tasks, an amortized model instead learns to predict solutions quickly, shifting some computation into training. These uses call for different outputs and evaluation measures, not just a new dataset. section 11.9 section 11.6

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Defines classification and regression, then works through neural-network training and optimization applications; the TSP implementation uses a pretrained model.
Examples
Uses traffic-sign recognition, penguin classification, traveling-salesperson tours, and convex-hull point selection.
What it assumes
Introduces the labeled-input idea directly, while implementations use Python datasets, neural networks, and optimization libraries.
What you can do after
Apply it via PySwarms to train a penguin classifier, or operate a pretrained graph model on traveling-salesperson instances.
How it connects
Connects neural networks, particle swarm optimization, imitation learning, graph neural networks, pointer networks, and amortized optimization.

Also explained in

Compare how 19 books explain supervised learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.