xskillscore.brier_score

xskillscore.brier_score(observations, forecasts, dim=None, weights=None, keep_attrs=False)

Calculate Brier score (BS).

Parameters
  • observations (xarray.Dataset or xarray.DataArray) – The observations or set of observations of the event. Data should be boolean or logical (True or 1 for event occurance, False or 0 for non-occurance).

  • forecasts (xarray.Dataset or xarray.DataArray) – The forecast likelihoods of the event. Data should be between 0 and 1.

  • dim (str or list of str, optional) – Dimension over which to compute mean after computing brier_score. 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.

Returns

Return type

xarray.Dataset or xarray.DataArray

See also

properscoring.brier_score()

References