MSE - Mean Squared Error

So it becomes just the difference between the prediction and the target!

BCE - Binary Cross Entropy

Assuming y can either be 0 or 1.

Cross Entropy Loss

This is assuming is a one-hot vector, it is the generalized version of BCE.

Notation is pretty important here. Need to stop thinking in scalars and instead in vectors.

Focal Loss

Computes loss while being aware of class imbalances in the dataset.

SymbolMeaningTypeRange/Values
Number of classesScalarPositive integer
Class indexInteger
True label (one-hot)Binary
Predicted probability for class Probability, sum to 1
Modulating factorWeight
Focusing parameterHyperparameterUsually 2
Cross-entropy termReal