xskillscore.rps¶
-
xskillscore.
rps
(observations, forecasts, category_edges, dim=None, weights=None, keep_attrs=False, member_dim='member')¶ Calculate Ranked Probability Score.
\[RPS(p, k) = 1/M \sum_{m=1}^{M} [(\sum_{k=1}^{m} p_k) - (\sum_{k=1}^{m} o_k)]^{2}\]- Parameters
observations (xarray.Dataset or xarray.DataArray) – The observations or set of observations of the event.
forecasts (xarray.Dataset or xarray.DataArray) – The forecasts for the event.
category_edges (array_like) – Category bin edges used to compute the CDFs. Bins include the left most edge, but not the right.
dim (str or list of str, optional) – Dimension over which to compute mean after computing
rps
. Defaults to None implying averaging over all dimensions.weights (xr.DataArray with dimensions from dim, optional) – Weights for weighted.mean(dim). Defaults to None, such that no weighting is applied.
keep_attrs (bool) – If True, the attributes (attrs) will be copied from the first input to the new one. If False (default), the new object will be returned without attributes.
member_dim (str, optional) – Name of ensemble member dimension. By default, ‘member’.
- Returns
ranked probability score
- Return type
References
https://www.cawcr.gov.au/projects/verification/verif_web_page.html#RPS