earthkit.meteo.score.xarray.mean_abs_error¶
- earthkit.meteo.score.xarray.mean_abs_error(fcst, obs, over, weights=None, is_angular=False)¶
Calculates the mean absolute error between a forecast and observations.
Warning
Experimental API. This function may change or be removed without notice.
The mean absolute error is defined as:
\[e = \frac{\sum_{i=1}^N |f_i - o_i| w_i}{\sum_{i=1}^N w_i}\]where:
\(f_i\) is the forecast,
\(o_i\) are the observations,
\(w_i\) are the weights,
\(e\) is the mean absolute error.
See also
This function leverages the scores.continuous.mae function.
- Parameters:
fcst (
xarray object) – The forecast xarray.obs (
xarray object) – The observations xarray.over (
strorlistofstr) – The dimension(s) over which to aggregate.weights (
xarray object, optional) – Weights to apply during aggregation. Default is None.is_angular (
bool, optional) – Whether the data represents angular quantities in degrees. Default is False.
- Returns:
The mean absolute error between the forecast and observations.
- Return type:
xarray object