Calculates the Kling-Gupta Efficiency (Gupta et al. 2009) between
observed and modelled values, in its conventional orientation where
higher is better (1 = perfect fit).
Value
numeric; KGE, with a maximum of 1 (perfect fit). Returns NA if
undefined (e.g., zero observed variance or mean).
Details
KGE decomposes fit into three components instead of conflating them the
way nse's single squared-error term does:
$$\text{KGE} = 1 - \sqrt{(r - 1)^2 + (\alpha - 1)^2 + (\beta - 1)^2}$$
where the variability ratio (\(\alpha\)) and bias ratio (\(\beta\)) are calculated as:
$$\alpha = \frac{\sigma_{\text{sim}}}{\sigma_{\text{obs}}}, \quad \beta = \frac{\mu_{\text{sim}}}{\mu_{\text{obs}}}$$
with \(r\) being the Pearson correlation, \(\sigma\) the standard deviation,
and \(\mu\) the mean. Maximum is 1 (perfect fit). Being dimensionless like NSE,
it is also a reasonable choice when combining fit values across variables with
different units or magnitudes, and is generally preferred over NSE in
current hydrological/environmental modelling practice.
calib_aeme() and run_and_fit() minimise the values returned by
FUN_list entries - use kge_loss (which returns
-1 * kge(obs, sim)) as a calibration objective.
See also
kge_loss for the minimise-oriented variant used in
FUN_list.
