scoringrules.es_ensemble

Contents

scoringrules.es_ensemble#

scoringrules.es_ensemble(obs: Array, fct: Array, m_axis: int = -2, v_axis: int = -1, *, ens_w: Array = None, estimator: str = 'nrg', backend: Backend = None) Array#

Compute the Energy Score for a finite multivariate ensemble.

The Energy Score is a multivariate scoring rule expressed as

\[\text{ES}(F_{ens}, \mathbf{y})= \frac{1}{M} \sum_{m=1}^{M} \| \mathbf{x}_{m} - \mathbf{y} \| - \frac{1}{2 M^{2}} \sum_{m=1}^{M} \sum_{j=1}^{M} \| \mathbf{x}_{m} - \mathbf{x}_{j} \|,\]

where \(||\cdot||\) is the euclidean norm over the input dimensions (the variables).

Parameters:
obsarray_like

The observed values, where the variables dimension is by default the last axis.

fctarray_like

The predicted forecast ensemble, where the ensemble dimension is by default represented by the second last axis and the variables dimension by the last axis.

m_axisint

The axis corresponding to the ensemble dimension on the forecasts array. Defaults to -2.

v_axisint

The axis corresponding to the variables dimension on the forecasts array (or the observations array with an extra dimension on m_axis). Defaults to -1.

ens_warray_like

Weights assigned to the ensemble members. Array with one less dimension than fct (without the v_axis dimension). Default is equal weighting. Weights are normalised so that they sum to one across the ensemble members.

estimatorstr

The energy score estimator to be used.

backendstr

The name of the backend used for computations. Defaults to ‘numba’ if available, else ‘numpy’.

Returns:
es_ensemblearray_like

The computed Energy Score.

See also

twes_ensemble, owes_ensemble, vres_ensemble

Weighted variants of the Energy Score.

crps_ensemble

The univariate equivalent of the Energy Score.

Notes

Multivariate outcomes:

Some theoretical background on scoring rules for multivariate forecasts.