Get normalization factor for normalizing distance metrics.
A distance metric is normalized by the standard deviation or variance of the verification product. The goal of a normalized distance metric is to get a constant and comparable value of typically 1 (or 0 for metrics defined as 1 - metric), when the metric saturates 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. For example, NRMSE gets smaller in comparison
m2mby design, because the ensemble mean is always closer to individual ensemble members than ensemble members to each other.
This is used for NMSE, NRMSE, MSSS, NMAE.
Parameters: comparison (class) – comparison class. Returns: normalization factor. Return type: fac (int) Raises: KeyError – if comparison is not matching.
>>> # 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()
- 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.