pastas.stats.metrics.kge_2012#

kge_2012(obs, sim, missing='drop', weighted=False, max_gap=30)[source]#

Compute the (weighted) Kling-Gupta Efficiency (KGE).

Parameters
  • sim (pandas.Series) – Series with the simulated values.

  • obs (pandas.Series) – The Series with the observed values.

  • missing (str, optional) – string with the rule to deal with missing values. Only “drop” is supported now.

  • weighted (bool, optional) – Weight the values by the normalized time step to account for irregular time series. Default is False.

  • max_gap (int, optional) – maximum allowed gap period in days to use for the computation of the weights. All time steps larger than max_gap are replace with the max_gap value. Default value is 30 days.

Return type

float

Notes

The (weighted) Kling-Gupta Efficiency Kling et al. [2012] is computed as follows:

\[\text{KGE} = 1 - \sqrt{(r-1)^2 + (\beta-1)^2 - (\gamma-1)^2}\]

where \(\beta = \bar{x} / \bar{y}\) and \(\gamma = \frac{\bar{\sigma}_x / \bar{x}}{\bar{\sigma}_y / \bar{y}}\). If weighted equals True, the weighted mean, variance and pearson correlation are used.