climpred.metrics._get_norm_factor

climpred.metrics._get_norm_factor(comparison)[source]
Get normalization factor with respect to the type of comparison used for
normalized distance-based metrics PPP, NMSE, NRMSE, MSSS, NMAE.
A distance-based metric is normalized by the standard deviation or variance
of a reference/control simulation. The goal of a normalized distance-based metric is to get a constant and comparable value of typically 1 (or 0 for metrics defined as 1 - ), when the metric saturizes and the predictability horizon is reached. To directly compare skill between different comparisons used, a factor is added in the normalized metric formula, see Seferian et al. 2018. Exemplarily, NRMSE gets smaller in comparison ‘m2e’ than ‘m2m’ by design because the ensemble mean is always closer to individual ensemble members than ensemble members to each other.
Parameters:comparison (class) – comparison class.
Returns:normalization factor.
Return type:fac (int)
Raises:KeyError – if comparison is not matching.

Example

>>> # check skill saturation value of roughly 1 for different comparisons
>>> metric='nrmse'
>>> for c in ['m2m', 'm2e', 'm2c', 'e2c']:
        s = compute_perfect_model(ds, control, metric=metric,  comparison=c)
        s.plot(label=' '.join([metric,c]))
>>> plt.legend()
Reference:
  • Séférian, Roland, Sarah Berthet, and Matthieu Chevallier. “Assessing
the Decadal Predictability of Land and Ocean Carbon Uptake.” Geophysical Research Letters, March 15, 2018. https://doi.org/10/gdb424.