C1W3 programming exercise: what is 2-class data set?

Hello dear DeepLeraning.ai community.

The second chapter of the programming exercise for C1W3 (“2 - Load the Dataset”) starts with a sentence that contains the words “… 2-class dataset …”.

What is a 2-class dataset?

Thank you in advance.


It just means that for each point in the dataset, there are two possible values for the “label” of that point: red or blue in this particular case.

1 Like

In the week 2 video Binary Classification Prof Ng says ‘ … So in binary classification, our goal is to learn a classifier that can input an image represented by this feature vector x. And predict whether the corresponding label y is 1 or 0, that is, whether this is a cat image or a non-cat image…’

my emphasis added

Binary classification works on a 2-class dataset like the one in this exercise. Later you will generalize further and do multi-class classification.

1 Like

Thanks for the explicit reference to what Prof Ng says on this point. So you could interpret the 1 and 0 binary labels as “blue” and “not-blue” instead of “blue” and “red” to make it clear how the “binary” logic applies in this case. But (after all), “binary” means “having two states”, right? It could be “on” and “off” or “true” and “false” or “blue” and “not-blue”. The underlying mechanisms are the same, but we then can apply our interpretation as appropriate for the problem at hand.