Lesson 10 Discussion & Wiki (2019)

This is what i understood:
First Multiclass vs Multilabel:

  • Multiclass classification means a classification task with more than two classes; e.g., classify a set of images of fruits which may be oranges, apples, or pears. Multiclass classification makes the assumption that each sample is assigned to one and only one label: a fruit can be either an apple or a pear but not both at the same time.
  • Multilabel classification assigns to each sample a set of target labels. This can be thought as predicting properties of a data-point that are not mutually exclusive, such as topics that are relevant for a document. A text might be about any of religion, politics, finance or education at the same time or none of these.(https://scikit-learn.org/stable/modules/multiclass.html)

So MNIST is Multiclass and Planets dataset is Multilabel.

Categorical Cross entropy loss - softmax + NLL, for multiclass problems
Binary cross entropy loss - sigmoid + binary log likelihood, for multilabel problems

Softmax tends to push one value higher than the others. So this is suited for Multiclass problems. As you want to predict a single class.
In Jeremy’s example we had img1,img2 with the following labels - cat, dog, plane, fish, building. This means that your training your model to predict wether the image has a combination of cat, dog, plane, fish, building. So if you use softmax now you are only going to push one of those labels. When in reality your image could have had a dog and a cat. So if you use sigmoid for each of these 5 labels and set a certain threshold value you can find out which of these labels existed in the image.

Softmax is great when you have exactly one (no more than one and definitely at least one) of the classes.
softmax is a good idea for language modeling where we want to know what’s the next word. it’s definitely one word and not more than one word.

I hope i’m right, someone please correct me before i mislead more people :slight_smile:
great explanation here -(20:00)
https://www.youtube.com/watch?v=O5eHvucGTk4&feature=youtu.be&t=1150
thanks to @wdhorton