climpred.metrics._rps¶
-
climpred.metrics._rps(forecast, verif, dim=None, **metric_kwargs)[source]¶ 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}](../_images/math/ddbc1fe3c9a192ec6fe5a14e39e15fca35606325.png)
- Parameters
forecast (xr.object) – Raw forecasts with
memberdimension.verif (xr.object) – Verification data without
memberdim.dim (list or str) – Dimensions to aggregate. Requires to contain member.
category_edges (array_like) – Category bin edges used to compute the CDFs. Bins include the left most edge, but not the right. Passed via metric_kwargs.
- Details:
minimum
0.0
maximum
1.0
perfect
0.0
orientation
negative
See also
Example
>>> category_edges = np.array([-.5, 0., .5, 1.]) >>> hindcast.verify(metric='rps', comparison='m2o', dim='member', alignment='same_verifs', category_edges=category_edges) >>> perfect_model.verify(metric='rps', comparison='m2c', dim='member', category_edges=category_edges)