radarx.retrieve.nowcast_verification.reliability#
- radarx.retrieve.nowcast_verification.reliability(probability, event, *, bins=10)[source]#
Reliability diagram: observed frequency for binned forecast probability.
The pairs of forecast probability and outcome are sorted into
binsequal intervals of probability, and for each the mean forecast probability and the observed relative frequency are given, the calibration-refinement view of Murphy and Winkler (1987) [1]. A reliable forecast lies on the diagonal. All dimensions are pooled. NaN pairs are left out.- Parameters:
probability (
xarray.DataArray) – Probabilities between 0 and 1.event (
xarray.DataArray) – Outcome: boolean or 0 and 1; broadcast againstprobability.bins (
int, optional) – Number of probability intervals. Default 10.
- Returns:
xarray.Dataset– On the dimensionbin:forecast_probability(mean probability in the bin),observed_frequencyandcount(NaN, NaN and 0 for an empty bin);binholds the centres of the intervals.- Raises:
ValueError – If
binsis less than 1 or a probability lies outside 0 to 1.
Notes
Dask. This function computes the dask array: it counts over the whole fields. The input is loaded into memory and the result is held in memory.
See also
References
Examples
>>> table = radarx.retrieve.reliability(prob, truth >= 35.0)