Analyze binary classification error using single values or batches. Export reports and compare prediction behavior. Understand every entry before tuning thresholds or retraining models.
This calculator measures how well predicted probabilities match binary labels. It accepts single values or full batches. You can evaluate average loss, weighted loss, and classification accuracy from one clean page.
Use labels as 0 or 1. Enter predicted probabilities between 0 and 1. Optional sample weights let you emphasize specific rows, and positive class weight helps when one class matters more.
For each row, the binary cross entropy loss is:
L = -[pos_weight × y × log(p) + (1 - y) × log(1 - p)]
Here, y is the true label, p is the predicted probability after epsilon clamping,
and pos_weight scales the positive class term.
If sample weights are provided, the weighted row loss is:
Weighted Row Loss = sample_weight × L
The weighted mean reported by this page is:
Weighted Mean BCE = Σ(sample_weight × L) / Σ(sample_weight)
| # | True Label | Prediction | Sample Weight |
|---|---|---|---|
| 1 | 1 | 0.91 | 1.00 |
| 2 | 0 | 0.14 | 1.00 |
| 3 | 1 | 0.77 | 1.50 |
| 4 | 1 | 0.63 | 1.00 |
| 5 | 0 | 0.22 | 0.80 |
You can load these same values into the form by pressing the example button above.
It measures the difference between true binary labels and predicted probabilities. Lower values indicate better probability estimates and better model calibration for binary classification tasks.
Standard binary cross entropy is designed for binary outcomes. This calculator follows that rule, so labels must represent negative and positive classes directly.
Clamping prevents logarithms of 0, which are undefined. It keeps the calculation stable when predictions are exactly 0 or exactly 1.
It increases the penalty on mistakes involving positive labels. This is useful when positive outcomes are rarer or more important in your dataset.
Sample weights let you give certain rows more influence. They are helpful when observations differ in reliability, importance, or frequency.
The threshold does not change the loss formula itself. It only changes the predicted class used for the accuracy value shown in the summary.
Choose weighted mean for normalized comparison, weighted sum for total penalty, and per-sample table when you want to inspect each observation individually.
Yes. Paste lists of labels and probabilities separated by commas, spaces, or line breaks. The calculator processes all rows together and exports the results.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.