Calculate the Kling-Gupta Efficiency (Gupta et al., 2009).
Dimensionless (from \(-\infty\) to 1). kge()
assesses the accuracy of
simulated data by considering correlation, bias, and variability relative
to observed data.
Usage
kge(data, ...)
# S3 method for class 'data.frame'
kge(data, truth, estimate, na_rm = TRUE, ...)
kge_vec(truth, estimate, na_rm = TRUE, ...)
Arguments
- data
A
data.frame
containing the columns specified by thetruth
andestimate
arguments.- ...
Not currently used.
- truth
The column identifier for the true results (that is
numeric
). This should be an unquoted column name although this argument is passed by expression and supports quasiquotation (you can unquote column names). For_vec()
functions, anumeric
vector.- estimate
The column identifier for the predicted results (that is also
numeric
). As withtruth
this can be specified different ways but the primary method is to use an unquoted variable name. For_vec()
functions, anumeric
vector.- na_rm
A
logical
value indicating whetherNA
values should be stripped before the computation proceeds.
Value
A tibble
with columns .metric
, .estimator
,
and .estimate
and 1 row of values.
For grouped data frames, the number of rows returned will be the same as the number of groups.
For kge_vec()
, a single numeric
value (or NA
).
Details
The Kling-Gupta Efficiency is a composite metric that decomposes model performance into three components: correlation (\(r\)), variability ratio (\(\alpha\)), and bias ratio (\(\beta\)). It improves upon the Nash-Sutcliffe Efficiency (see nse) by explicitly accounting for each source of error (Gupta et al., 2009).
The Kling-Gupta Efficiency is estimated as follows: $$ KGE = 1 - \sqrt{(r - 1)^2 + (\alpha - 1)^2 + (\beta - 1)^2} $$ where:
\(r\) is the linear Pearson correlation coefficient between observed and simulated values
\(\alpha = \sigma_{sim} / \sigma_{obs}\) is the ratio of the standard deviations (variability ratio)
\(\beta = \mu_{sim} / \mu_{obs}\) is the ratio of the means (bias ratio)
Note
Unlike the Nash–Sutcliffe Efficiency (nse), the KGE does not have an inherent benchmark such as "mean flow", and \(KGE = 0\) does not correspond to a baseline performance. Therefore, KGE values should not be interpreted as "good" or "bad" based solely on their sign or magnitude. Instead, users are encouraged to examine the individual components (\(r\), \(\alpha\), \(\beta\)) to understand the nature of model performance and consider defining explicit benchmarks based on the study context.
For further discussion, see Knoben et al. (2019), who caution against directly translating NSE-based interpretation thresholds to KGE.
References
Gupta, H.V.; Kling, H.; Yilmaz, K.K.; Martinez, G.F. (2009). Decomposition of the mean squared error and kge performance criteria: Implications for improving hydrological modelling. Journal of Hydrology, 377(1-2), 80-91. doi:10.1016/j.jhydrol.2009.08.003
Knoben, W. J. M., Freer, J. E., & Woods, R. A. (2019). Technical note: Inherent benchmark or not? Comparing Nash–Sutcliffe and Kling–Gupta efficiency scores. Hydrology and Earth System Sciences, 23, 4323–4331. doi:10.5194/hess-23-4323-2019