diff --git a/src/scores/continuous/standard_impl.py b/src/scores/continuous/standard_impl.py index f6e6c654..f14320c5 100644 --- a/src/scores/continuous/standard_impl.py +++ b/src/scores/continuous/standard_impl.py @@ -37,8 +37,8 @@ def mse( the squared error at each point (i.e. single-value comparison against observed), and the forecast and observed dimensions must match precisely. - weights: Not yet implemented. Allow weighted averaging (e.g. by - area, by latitude, by population, custom) + weights: Optionally provide an array for weighted averaging (e.g. by area, by latitude, + by population, custom) Returns: Union[xr.Dataset, xr.DataArray, pd.Dataframe, pd.Series]: An object containing @@ -98,8 +98,8 @@ def rmse( the absolute error at each point (i.e. single-value comparison against observed), and the forecast and observed dimensions must match precisely. - weights: Not yet implemented. Allow weighted averaging (e.g. by - area, by latitude, by population, custom) + weights: Optionally provide an array for weighted averaging (e.g. by area, by latitude, + by population, custom) Returns: An object containing @@ -144,9 +144,8 @@ def mae( as the forecast, and the errors will be the absolute error at each point (i.e. single-value comparison against observed), and the forecast and observed dimensions must match precisely. - weights: - Not yet implemented. Allow weighted averaging (e.g. by area, by - latitude, by population, custom). + weights: Optionally provide an array for weighted averaging (e.g. by area, by latitude, + by population, custom) Returns: By default an xarray DataArray containing diff --git a/src/scores/probability/crps_impl.py b/src/scores/probability/crps_impl.py index cdfcec9c..3ea49e7c 100644 --- a/src/scores/probability/crps_impl.py +++ b/src/scores/probability/crps_impl.py @@ -249,7 +249,8 @@ def crps_cdf( by taking the mean. reduce_dims (Tuple[str]): dimensions to reduce in the output by taking the mean. All other dimensions are preserved. - weights: Not yet implemented. Allow weighted averaging (e.g. by area, by latitude, by population, custom) + weights: Optionally provide an array for weighted averaging (e.g. by area, by latitude, + by population, custom) include_components (bool): if True, include the under and over forecast components of the score in the returned dataset.