A label is the particular feature a supervised-learning model tries to predict. Which feature counts as the label depends on the question: for a pet, it might be the type, health state, or age. section 2.3 section 2.4
Labels can be numerical, such as prices, sizes, weights, or ages, or categorical, such as cat/dog, sick/healthy, or spam/ham. Regression predicts numbers; classification predicts finite categories. section 2.7 section 2.9
Labels connect the dataset to the model’s prediction task:
- Labeled data includes the target feature; unlabeled data does not include a feature selected for prediction. section 2.6
- A supervised-learning model learns from labeled examples and predicts the label for new data points. section 2.5 section 2.7
- Features describe an example and provide the information used to predict its label. section 3.2
One dataset, different labels
For the same pet records, predicting cat or dog makes type the label; predicting sick or healthy makes health the label; predicting age makes age the label. In a housing dataset, the number of rooms can be a feature and the house price the label. section 2.4 section 3.2
Binary labels in practice
An admissions dataset turns a chance of admission of 0.75 or higher into the label “admitted,” and lower chances into “not admitted.” The features include test scores, grades, university ratings, recommendations, and research experience. section 9.12
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 datasets, where the label is either a category or a number, with an unlabeled image-only dataset. section 2.6




























