Classification log loss calculator

Calculate mean binary log loss and per-record binary log loss with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use mean binary log loss and per-record binary log loss to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Records: ID, predicted positive probability, binary actual label
A,0.1,0 B,0.9,1 C,0.5,1
Explicit symmetric probability clipping epsilon
0.01
Mean binary log loss (natural-log units)
0.301289
Per-record binary log loss
A: 0.105360515658; B: 0.105360515658; C: 0.69314718056
Number of probabilities changed by clipping
0
Records evaluated
3

Try another scenario

Records: ID, predicted positive probability, binary actual label
A,0.1,0 B,0.9,1 C,0,1
Explicit symmetric probability clipping epsilon
0.01
Mean binary log loss (natural-log units)
1.605297
Per-record binary log loss
A: 0.105360515658; B: 0.105360515658; C: 4.60517018599
Number of probabilities changed by clipping
1
Records evaluated
3
Calculation method

Calculation method

Mean binary log loss (natural-log units)

Mean of −ln(p) for actual 1 and −ln(1−p) for actual 0, after stated clipping.

Per-record binary log loss

Each record loss; impossible unclipped endpoint is displayed as Infinite.

Number of probabilities changed by clipping

Count of supplied probabilities altered by max(epsilon,min(1−epsilon,p)).

Records evaluated

Number of supplied records.

Symbols and units
a
Records: ID, predicted positive probability, binary actual label
b
Explicit symmetric probability clipping epsilon

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Binary unweighted natural-log loss for supplied probabilities. Explicit epsilon controls clipping; epsilon 0 preserves impossible-outcome infinity. The displayed results do not run or retrain a model.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Further reading

scikit-learn: log_loss ↗

Background reading; this does not imply endorsement or independent review of SumFizz.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.