A label is the class annotation assigned to a particular input. If a picture is annotated “dog,” that is its label; “dog” is also one of the possible classes the model can predict. The label supplies the target the prediction should match. section 4.0
Movie review labels
In the IMDb dataset, each review has a binary sentiment label: 0 means negative and 1 means positive. The training and test labels are stored separately in NumPy arrays alongside their respective review data. section 4.1.1
Listing 4.1 Loading the IMDb dataset
from keras.datasets import imdb (train_data, train_labels), (test_data, test_labels) = imdb.load_data( num_words=10000 )
Load the IMDb reviews and their labels with Keras; train_labels and test_labels hold the expected outputs. section 4.1.1
A target is the broader term for the desired output: classification uses class labels, while a regression target can be a continuous value, such as a house price. A loss measures the distance between the prediction and the target, providing feedback for learning. section 4.0 section 1.4
The task determines how many labels an input can have. Binary classification chooses between two exclusive classes; multiclass classification chooses among more than two. In multilabel classification, an image containing both a cat and a dog can receive both labels. section 4.0
Collecting labels can require substantial manual work. A photo search project might first select its image categories and then tag uploaded images; a spam detector might need a separate, manually tagged dataset when private chats cannot be used. Label reliability matters for generalization, so budget time for data collection rather than focusing only on model improvements. section 6.1.2




















