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
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


















