Log Loss (also called Logarithmic Loss or Cross-Entropy Loss)#
A loss penalising confident wrong probabilistic predictions.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Log loss (logarithmic loss / cross-entropy loss) scores a probabilistic classifier by the negative log-likelihood of the true labels — how surprised the model is by reality. For binary labels:
It runs from 0 (perfect) to ∞.
Its defining trait#
The logarithm makes log loss punish confident mistakes brutally — predicting 0.01 for a true positive costs far more than predicting 0.4. This exponential penalty for overconfidence is exactly why it is the standard training objective for logistic regression and neural nets, which optimize it directly.
When to use it (and a caveat)#
Reach for log loss whenever calibrated probabilities matter — fraud, diagnosis, risk. It requires genuine probabilities, so raw logits must be squashed (softmax / sigmoid) first, and it is harsher on overconfidence than the Brier score. Compare a model’s log loss to the base-rate log loss to confirm it adds value.
Theme: Classification & Averaging Metrics · All terminology
Hint
Mind map — connected ideas
Brier Score · Expected Calibration Error (ECE) · Binary Cross-Entropy (BCE) · Softmax Function · Logistic Regression · Strictly Proper Scoring Rules
Hint
More in Classification & Averaging Metrics
Accuracy · AUC (Area Under the Curve) · Average Precision (AP) · Binary Classification · Classification Probability · Discriminatory Power · F1-score · Gini Coefficient · Harmonic Mean · Macro AUC · Macro AUROC (Macro-Averaged AUROC) · Macro Averaging · Macro F1 · Macro Precision
See also
Source article Adapted (context, re-expressed) in our own words from: Log Loss (also called Logarithmic Loss or Cross-Entropy Loss) (insightful-data-lab.com).