scoringrules.log_score

Contents

scoringrules.log_score#

scoringrules.log_score(obs: ArrayLike, fct: ArrayLike, *, backend: Backend = None) Array#

Compute the Logarithmic Score (LS) for probability forecasts for binary outcomes.

The LS is formulated as

\[LS(f, y) = -\log|f + y - 1|,\]

where \(f \in [0, 1]\) is the predicted probability of an event and \(y \in \{0, 1\}\) the actual outcome.

Parameters:
obsarray_like

Observed outcome, either 0 or 1.

fctarray_like

Forecasted probabilities between 0 and 1.

backendstr

The name of the backend used for computations. Defaults to ‘numpy’.

Returns:
score:

The computed Log Score.