Calculation Results
Interpretation
Model Comparison
Detailed Calculation Table
Confusion Summary
Loss by Observation
Average Loss by Actual Class
Calculator Inputs
Formula Used
L = −(1/N) Σ [yᵢ ln(pᵢ) + (1 − yᵢ) ln(1 − pᵢ)]
L = −(1/N) Σᵢ Σ꜀ yᵢ,꜀ ln(pᵢ,꜀)
L = −[Σᵢ wᵢ Σ꜀ yᵢ,꜀ ln(pᵢ,꜀)] ÷ Σᵢ wᵢ
Here, N is the observation count. The actual label selects the correct-class probability. Lower loss indicates stronger probabilistic predictions.
How to Use
- Select binary or multiclass classification.
- Choose probability units, logarithm base, and precision.
- Enter actual labels and predicted probabilities.
- Enable weights, clipping, normalisation, or model comparison.
- Calculate and inspect summaries, row penalties, and charts.
- Copy, print, or export the completed results.
Example Data
| Observation | Actual label | Predicted probability | Individual loss |
|---|---|---|---|
| 1 | 1 | 0.90 | 0.105361 |
| 2 | 0 | 0.20 | 0.223144 |
| 3 | 1 | 0.60 | 0.510826 |
The mean natural-log loss for these predictions is approximately 0.279777. A confident wrong prediction would increase the score sharply.
Log Loss Guidance
Log loss rewards accurate probabilities. It also penalises unjustified confidence. Values approaching zero indicate excellent predictions.
Accuracy checks only final classes. Log loss evaluates the full probability distribution. Two equally accurate models can have different losses.
There is no universal good threshold. Compare against baselines and prior models. Always consider class balance and deployment costs.
Frequently Asked Questions
What does a lower log loss mean?
It means predicted probabilities align more closely with actual outcomes. Zero is the ideal limiting value.
Why are probabilities clipped?
Clipping prevents logarithms of zero. It also keeps calculations finite for extreme probabilities.
Can log loss be greater than one?
Yes. Confident incorrect predictions can create values much greater than one.
Does log loss work for multiclass models?
Yes. The calculator uses the predicted probability assigned to each actual class.
Must multiclass probabilities total one?
Normally, yes. Optional normalisation can correct small row-sum differences.
How do sample weights affect results?
Rows with larger weights contribute more strongly to the final weighted average.
Is log loss the same as cross-entropy?
In common classification settings, log loss is the average cross-entropy objective.
Which logarithm base should I use?
Natural logarithms are standard. Other bases rescale values without changing model rankings.
Can I compare two models here?
Yes. Enable comparison mode and provide probabilities for Models A and B.