Keypoints
Multilabel classification
 Multilabel classification refers to the problem of identifying the categories of objects in images that may not contain exactly one type of object.
 There may be more than one kind of object, or there may be no objects at all in the classes that you are looking for.
 See two examples below where we have a bear dataset with a dog included named bear and another example where the cat is classified as cat and horse.
 As a note, in FastAI we can handle the multilabels with MultiCategoryBlock which will encode all the vocabulary into a list of 0’s and have 1s where data is present.
 So, by checking where 1’s are we can identify which category(s) that image belongs to.
 This technique of representing the data in 1’s on a vector of 0s is called Onehot encoding.
Binary CrossEntropy Loss
 In the case of single category labels, we have the crossentropy loss.
 The CrossEntropy loss is a combination of using the negative log likelihood on the log values of the probabilities from the softmax function.
 But in the case of multicategory labels, we don’t have the probabilities rather we have the onehot encoded values.
 In this case, the best option would be the binary crossentropy loss which is basically just mnist_loss along with log.


 So, once we are ready with the data and preparing to create Learner for training, we do not need to explicitly provide the loss. The FastAI will pick up the binary corssentorpy loss by default.
 Now that we have the loss ready, we need to pick a metric which is accuracy by default for all the classification problems we worked on.
 But the accuracy is not a good fit for this problem of multilabel since for each image we could have more than one prediction. So we need to use accuracy_multi with a threshold that will address the problem.
Note: Since the threshold for the accuracy_multi is by default 0.5, we can override the function using the partial function from python.
Example of the Learner in this case:


Regression
 A regression problem is when the output variable is a real or continuous value, such as “salary” or “weight”.
 Many different models can be used, the simplest is the linear regression. It tries to fit data with the best hyperplane which goes through the points.
 An image regression problem refers to learning from a dataset where the independent variable is an image, and the dependent variable is one or more floats.
 And image regression is simply a CNN under the hood. One of the key perspective to consider while building a datablock for regression is to use pointblock instead of a category block since the labels represents coordinates.
 Another important point to remember while construction the Learner is to provide the y_range=(1,1) attribute to make sure that we give the range of the rescaled coordinates.


 In the case of the regression problem, the loss that can used is MSELoss (Mean Squared Error loss).
 The MSE tells you how close a regression line is to a set of points. It does this by taking the distances from the points to the regression line (these distances are the “errors”) and squaring them.
Conclusion
 All the problems like singlelabel classification, multilabel classification & regression seems to work on basis of same model except for the loss function that changes every time.
 So, we need to keep an eye on hyper parameters and loss which will effect the results.