Variogram Score
The varigoram score (VS) is a scoring rule for evaluating multivariate probabilistic forecasts. It is defined as
where \(p > 0\), \(\mathbf{y} = (y_{1}, \dots, y_{d}) \in \mathbb{R}^{d}\) is the multivariate observation (\(d > 1\)), and \(\mathbf{X} = (X_{1}, \dots, X_{d})\) is a random vector that follows the multivariate forecast distribution \(F\) (Scheuerer and Hamill, 2015)1. The exponent \(p\) is typically chosen to be 0.5 or 1.
The variogram score is less sensitive to marginal forecast performance than the energy score, and Scheuerer and Hamill (2015) argue that it should therefore be more sensitive to errors in the forecast's dependence structure.
While multivariate probabilistic forecasts could belong to a parametric family of distributions, such as a multivariate normal distribution, it is more common in practice that these forecasts are ensemble forecasts; that is, the forecast is comprised of a predictive sample \(\mathbf{x}_{1}, \dots, \mathbf{x}_{M}\), where each ensemble member \(\mathbf{x}_{i} = (x_{i, 1}, \dots, x_{i, d}) \in \R^{d}\) for \(i = 1, \dots, M\).
In this case, the expectation in the definition of the variogram score can be replaced by a sample mean over the ensemble members, yielding the following representation of the variogram score when evaluating an ensemble forecast \(F_{ens}\) with \(M\) members.
scoringrules.variogram_score
variogram_score(
observations: Array,
forecasts: Array,
/,
m_axis: int = -2,
v_axis: int = -1,
*,
p: float = 1.0,
backend: Backend = None,
) -> Array
Compute the Variogram Score for a finite multivariate ensemble.
For a \(D\)-variate ensemble the Variogram Score (Sheuerer and Hamill, 2015) of order \(p\) is expressed as
where \(\mathbf{X}\) and \(\mathbf{X'}\) are independently sampled ensembles from from \(F\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
forecasts
|
Array
|
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. |
required |
observations
|
Array
|
The observed values, where the variables dimension is by default the last axis. |
required |
p
|
float
|
The order of the Variogram Score. Typical values are 0.5, 1.0 or 2.0. Defaults to 1.0. |
1.0
|
m_axis
|
int
|
The axis corresponding to the ensemble dimension. Defaults to -2. |
-2
|
v_axis
|
int
|
The axis corresponding to the variables dimension. Defaults to -1. |
-1
|
backend
|
Backend
|
The name of the backend used for computations. Defaults to 'numba' if available, else 'numpy'. |
None
|
Returns:
Name | Type | Description |
---|---|---|
variogram_score |
Array
|
The computed Variogram Score. |
Weighted versions
It is often the case that certain outcomes are of more interest than others when evaluating
forecast performance. These outcomes can be emphasised by employing weighted scoring rules.
Weighted scoring rules typically introduce a weight function into conventional scoring rules,
and users can choose the weight function depending on what outcomes they want to emphasise.
Allen et al. (2022)2 introduced three weighted versions of the variogram score.
These are all available in scoringrules
.
Firstly, the outcome-weighted variogram score (see also Holzmann and Klar (2014)3) is defined as
where
for \(\mathbf{x} = (x_{1}, \dots, x_{d}) \in \mathbb{R}^{d}\) and \(\mathbf{z} = (z_{1}, \dots, z_{d}) \in \mathbb{R}^{d}\).
Here, \(w : \mathbb{R}^{d} \to [0, \infty)\) is the non-negative weight function used to target particular multivariate outcomes, and \(\bar{w} = \mathbb{E}[w(X)]\). As before, \(\mathbf{X}, \mathbf{X}^{\prime} \sim F\) are independent.
scoringrules.owvariogram_score
owvariogram_score(
observations: Array,
forecasts: Array,
w_func: tp.Callable,
/,
m_axis: int = -2,
v_axis: int = -1,
*,
p: float = 1.0,
backend: Backend = None,
) -> Array
Compute the Outcome-Weighted Variogram Score (owVS) for a finite multivariate ensemble.
Computation is performed using the ensemble representation of the owVS in Allen et al. (2022):
where \(F_{ens}\) is the ensemble forecast \(\mathbf{x}_{1}, \dots, \mathbf{x}_{M}\) with \(M\) members, \(w\) is the chosen weight function, and \(\bar{w} = \sum_{m=1}^{M}w(\mathbf{x}_{m})/M\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
forecasts
|
Array
|
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. |
required |
observations
|
Array
|
The observed values, where the variables dimension is by default the last axis. |
required |
p
|
float
|
The order of the Variogram Score. Typical values are 0.5, 1.0 or 2.0. Defaults to 1.0. |
1.0
|
w_func
|
Callable
|
Weight function used to emphasise particular outcomes. |
required |
m_axis
|
int
|
The axis corresponding to the ensemble dimension. Defaults to -2. |
-2
|
v_axis
|
int
|
The axis corresponding to the variables dimension. Defaults to -1. |
-1
|
backend
|
Backend
|
The name of the backend used for computations. Defaults to 'numba' if available, else 'numpy'. |
None
|
Returns:
Name | Type | Description |
---|---|---|
owvariogram_score |
ArrayLike of shape (...)
|
The computed Outcome-Weighted Variogram Score. |
Secondly, Allen et al. (2022) introduced the threshold-weighted variogram score as
where \(v : \mathbb{R}^{d} \to \mathbb{R}^{d}\) is a so-called chaining function, so that \(v(\mathbf{X}) = (v(\mathbf{X})_{1}, \dots, v(\mathbf{X})_{d}) \in \mathbb{R}^{d}\). The threshold-weighted variogram score transforms the forecasts and observations according to the chaining function \(v\), prior to calculating the unweighted variogram score. Choosing a chaining function is generally more difficult than choosing a weight function when emphasising particular outcomes.
scoringrules.twvariogram_score
twvariogram_score(
observations: Array,
forecasts: Array,
v_func: tp.Callable,
/,
m_axis: int = -2,
v_axis: int = -1,
*,
p: float = 1.0,
backend: Backend = None,
) -> Array
Compute the Threshold-Weighted Variogram Score (twVS) for a finite multivariate ensemble.
Computation is performed using the ensemble representation of the twVS in Allen et al. (2022):
where \(F_{ens}\) is the ensemble forecast \(\mathbf{x}_{1}, \dots, \mathbf{x}_{M}\) with \(M\) members, and \(v\) is the chaining function used to target particular outcomes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
forecasts
|
Array
|
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. |
required |
observations
|
Array
|
The observed values, where the variables dimension is by default the last axis. |
required |
p
|
float
|
The order of the Variogram Score. Typical values are 0.5, 1.0 or 2.0. Defaults to 1.0. |
1.0
|
v_func
|
Callable
|
Chaining function used to emphasise particular outcomes. |
required |
m_axis
|
int
|
The axis corresponding to the ensemble dimension. Defaults to -2. |
-2
|
v_axis
|
int
|
The axis corresponding to the variables dimension. Defaults to -1. |
-1
|
backend
|
Backend
|
The name of the backend used for computations. Defaults to 'numba' if available, else 'numpy'. |
None
|
Returns:
Name | Type | Description |
---|---|---|
twvariogram_score |
ArrayLike of shape (...)
|
The computed Threshold-Weighted Variogram Score. |
As an alternative, the vertically re-scaled variogram score is defined as
where \(w\) and \(\rho_{p}\) are as defined above, and \(\mathbf{x}_{0} \in \mathbb{R}^{d}\). Typically, \(\mathbf{x}_{0}\) is chosen to be the zero vector.
scoringrules.vrvariogram_score
vrvariogram_score(
observations: Array,
forecasts: Array,
w_func: tp.Callable,
/,
m_axis: int = -2,
v_axis: int = -1,
*,
p: float = 1.0,
backend: Backend = None,
) -> Array
Compute the Vertically Re-scaled Variogram Score (vrVS) for a finite multivariate ensemble.
Computation is performed using the ensemble representation of the vrVS in Allen et al. (2022):
where \(F_{ens}\) is the ensemble forecast \(\mathbf{x}_{1}, \dots, \mathbf{x}_{M}\) with \(M\) members, \(w\) is the chosen weight function, and \(\bar{w} = \sum_{m=1}^{M}w(\mathbf{x}_{m})/M\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observations
|
Array
|
The observed values, where the variables dimension is by default the last axis. |
required |
forecasts
|
Array
|
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. |
required |
p
|
float
|
The order of the Variogram Score. Typical values are 0.5, 1.0 or 2.0. Defaults to 1.0. |
1.0
|
w_func
|
Callable
|
Weight function used to emphasise particular outcomes. |
required |
m_axis
|
int
|
The axis corresponding to the ensemble dimension. Defaults to -2. |
-2
|
v_axis
|
int
|
The axis corresponding to the variables dimension. Defaults to -1. |
-1
|
backend
|
Backend
|
The name of the backend used for computations. Defaults to 'numba' if available, else 'numpy'. |
None
|
Returns:
Name | Type | Description |
---|---|---|
vrvariogram_score |
ArrayLike of shape (...)
|
The computed Vertically Re-scaled Variogram Score. |
Each of these weighted variogram scores targets particular outcomes in a different way. Further details regarding the differences between these scoring rules, as well as choices for the weight and chaining functions, can be found in Allen et al. (2022). The weighted variogram scores can easily be computed for ensemble forecasts by replacing the expectations with sample means over the ensemble members.
-
Michael Scheuerer and Thomas M. Hamill. Variogram-Based Proper Scoring Rules for Probabilistic Forecasts of Multivariate Quantities. Monthly Weather Review, 2015. URL: https://journals.ametsoc.org/view/journals/mwre/143/4/mwr-d-14-00269.1.xml, doi:10.1175/MWR-D-14-00269.1. ↩
-
Sam Allen, David Ginsbourger, and Johanna Ziegel. Evaluating forecasts for high-impact events using transformed kernel scores. arXiv preprint arXiv:2202.12732, 2022. ↩
-
Hajo Holzmann and Bernhard Klar. Focusing on regions of interest in forecast evaluation. The Annals of Applied Statistics, 11:2404–2431, 2017. ↩