A label says which class an input belongs to. If a picture is annotated as a dog, “dog” is that picture’s label; “dog” and “cat” are possible classes. The broader term target means the output a model should ideally predict, so a continuous house price is a target but not a class label. Predictions are compared with targets to measure error. section 4.0
A review and its label
In the IMDb dataset, each review is an input and its sentiment is the label. The arrays `train_labels` and `test_labels` contain 0s for negative reviews and 1s for positive reviews. The number is an encoding of the class, not a word from the review. section 4.1.1
>>> train_data[0] [1, 14, 22, 16, ... 178, 32] >>> train_labels[0] 1
Compare `train_data[0]`, a review encoded as word indices, with `train_labels[0]`, its expected class encoded as `1`. section 4.1.1
Decide what labels mean before collecting them:
- Choose the classes for the task, then annotate examples consistently. A photo search project, for instance, first needs a set of image categories and then tagged images. section 6.1.2
- Check whether an input can have one label or several. An image containing both a cat and a dog can carry both labels in multilabel classification. section 4.0
- Treat label reliability as a dataset concern, not an afterthought: it is one of the data properties that affects generalization. section 6.1.2



















