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.
| Symbol | Meaning | Type | Range/Values |
|---|---|---|---|
| Number of classes | Scalar | Positive integer | |
| Class index | Integer | ||
| True label (one-hot) | Binary | ||
| Predicted probability for class | Probability | , sum to 1 | |
| Modulating factor | Weight | ||
| Focusing parameter | Hyperparameter | Usually 2 | |
| Cross-entropy term | Real |
