Description
Compute binary natural-log loss from probability and outcome, then multiply by nonnegative weight.
Probabilistic scores evaluate predictions against outcomes. Probability-domain rules, logarithm bases, and whether class terms are summed or averaged must be explicit.
Compute binary natural-log loss from probability and outcome, then multiply by nonnegative weight.
When to use this tool
Use Metrics: Log Loss Probability Term when you need one probability-loss term or its declared range.
How to use the tool and how it works
- Enter probability, outcome, weight. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Compute binary natural-log loss from probability and outcome, then multiply by nonnegative weight. Return both the unweighted and weighted terms.1
The linked strict binary log-loss calculator is invoked through the shared helper with one outcome and probability. It requires outcome zero or one and probability strictly inside (0, 1), including when the outer weight is zero.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| probability | Predicted probability, strictly greater than zero and less than one. | Required. Finite number. |
| outcome | Binary observed label: zero or one. | Required. Safe integer. |
| weight | Nonnegative multiplier; zero does not bypass probability/outcome validation. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.unweightedLogLoss | Unweighted Log Loss | Calculated result member: number. |
| result.weightedLogLoss | Weighted Log Loss | Calculated result member: number. |
{
"input": {
"probability": 0.5,
"outcome": 1,
"weight": 2
},
"output": {
"result": {
"unweightedLogLoss": 0.6931471805599453,
"weightedLogLoss": 1.3862943611198906
}
}
} Limitations and assumptions
- Probability must be strictly between zero and one and outcome must be zero or one, even when weight is zero; no endpoint clipping or dataset averaging is added.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a complete set of validated predictions and examine calibration as well as aggregate score.
References
Similar or alternative tools
- Binary Log Loss Logit Stable Term
For binary outcome, calculate max(logit, 0) - outcome × logit + log1p(exp(-abs(logit))).
- Multiclass Brier Single Observation Range
Return a minimum score of zero and a maximum of two, or 2/classes when normalized is true, requiring at least two classes.