Calculated results
Interactive Plotly graph
Interpretation
Formula used
Selected-point details
Processed data
0 rowsFormula used
Binary cross-entropy
Categorical cross-entropy
Weighted cross-entropy
How to use
- Choose binary, categorical, training-history, or batch comparison mode.
- Enter probabilities or logits, labels, weights, smoothing, and clipping values.
- Select a graph view and adjust the visual display options.
- Press calculate to view losses, gradients, diagnostics, and processed rows.
- Export the table, chart, or complete report when finished.
Example data
| Example | Actual target | Prediction | Expected behavior |
|---|---|---|---|
| Correct high confidence | 1 | 0.95 | Very small loss |
| Correct low confidence | 1 | 0.55 | Moderate loss |
| Incorrect high confidence | 1 | 0.02 | Very large loss |
| Three-class example | Dog | 0.10, 0.78, 0.12 | Loss follows Dog probability |
| Overfitting history | Validation split | Loss rises after epoch six | Early-stopping warning |
Frequently asked questions
What does cross-entropy measure?
It measures disagreement between target labels and predicted probability distributions. Lower values usually indicate better probability predictions.
Why can cross-entropy become extremely large?
A confidently incorrect prediction assigns almost zero probability to the true outcome. The logarithm then creates a large penalty.
Why is probability clipping required?
Clipping prevents logarithms of zero and protects calculations from infinite or undefined values.
When should logits be used?
Use logits when predictions come directly from model outputs before sigmoid or softmax conversion.
What does label smoothing change?
It replaces perfectly hard targets with slightly distributed targets. This can reduce overconfidence and improve generalisation.
How do class weights affect loss?
Weights increase or decrease penalties for selected classes. They are useful with imbalanced datasets.
How is overfitting identified?
Training loss continues falling while validation loss stops improving or rises. The calculator estimates this gap and marks the best epoch.
What is the best loss value?
Zero is the theoretical minimum for perfect probability assignments. Practical values depend on class count, noise, and task difficulty.
Can several models be compared?
Yes. Training-history columns and batch model names create separate curves and model-level summaries.