climpred.metrics._median_absolute_error

climpred.metrics._median_absolute_error#

climpred.metrics._median_absolute_error(forecast: Dataset, verif: Dataset, dim: str | List[str] | None = None, **metric_kwargs: Any) Dataset[source]#

Median Absolute Error.

median(|f - o|)

The median of the absolute differences between forecasts and verification data. Applying the median function to absolute error makes it more robust to outliers.

Parameters:

Notes

minimum

0.0

maximum

perfect

0.0

orientation

negative

Example

>>> HindcastEnsemble.verify(
...     metric="median_absolute_error",
...     comparison="e2o",
...     alignment="same_verifs",
...     dim="init",
... )
<xarray.Dataset>
Dimensions:  (lead: 10)
Coordinates:
  * lead     (lead) int32 1 2 3 4 5 6 7 8 9 10
    skill    <U11 'initialized'
Data variables:
    SST      (lead) float64 0.06077 0.06556 0.06368 ... 0.1131 0.142 0.1466
Attributes:
    prediction_skill_software:     climpred https://climpred.readthedocs.io/
    skill_calculated_by_function:  HindcastEnsemble.verify()
    number_of_initializations:     64
    number_of_members:             10
    alignment:                     same_verifs
    metric:                        median_absolute_error
    comparison:                    e2o
    dim:                           init
    reference:                     []