Supervised learning teaches a model from labeled examples: each data point includes inputs and a target label. The model learns a rule from known examples, then predicts the label for unseen data. section 2.6 section 2.7
The target label determines the kind of prediction:
- Regression predicts numerical data, such as a price, size, weight, or other number. section 2.7 section 2.17
- Classification predicts categorical data, such as dog or cat, legitimate or fraudulent, or another finite set of classes. section 2.7 section 2.17
- The basic process is remember the labeled dataset, formulate a rule, and predict an output for new data. section 2.7
Recognizing a new pet image
A dataset of pet images labeled “dog” or “cat” lets a model learn patterns associated with each category. When given an unlabeled image, it predicts whether the image shows a dog or a cat. A second labeled dataset might pair pet images with numerical weights, turning the task into regression. section 2.6 section 2.7
Figure 2.1 Labeled data is data that comes with a tag, or label. That label can be a type or a number. Unlabeled data is data that comes with no tag. The dataset on the left is labeled, and the label is the type of pet (dog/cat). The dataset in the middle is also labeled, and the label is the weight of the pet (in pounds). The dataset on the right is unlabeled.
Compare labeled pet data carrying a category or number with unlabeled pet images carrying no target feature. section 2.6
Practice identifying the learning setup in everyday applications:
- Classify recommendation systems, topic grouping, autocomplete, and fraud detection as supervised or unsupervised learning. section 2.18
- Choose regression or classification for spending prediction, voice decoding, stock decisions, and video recommendations. section 2.18























