When to use it?
When doing classification.
This statement is not correct. You can minimize the Negative Log Likelihood for any task, including regression. If the likelihood is of a Bernoulli distribution, (i.e you assume your data to follow Bernoulli, as in case of Binary Classification), you get the expression for the Binary Cross Entropy, widely used as a Loss function for Binary classification tasks.
If you assume your data to be gaussian, the NLL of gaussian can be used for regressions as well, and so on.




