What is the multi-label binary classification?

Reading PyTorch docs BCEWithLogitsLoss I have found:

where c is the class number (c > 1 for multi-label binary classification, c = 1 for single-label binary classification), nn is the number of the sample in the batch and p_cp c is the weight of the positive answer for the class cc .

What is the multi-label binary classification? Binary assume only two labels AFIK

Multi label classification allows a data sample to have more than 2 labels. For instance, you can think of a classifier that infers whether an animal is cat or not and whether the color of the animal is red at the same time. In this case, you have 2 labels(multi label) for the sample and the labels are all binary.

1 Like