pastas.stats.metrics.kge ======================== .. py:function:: pastas.stats.metrics.kge(obs: pandas.Series, sim: pandas.Series, missing: str = 'drop', weighted: bool = False, max_gap: int = 30, modified: bool = False, **kwargs) -> float Compute the (weighted) Kling-Gupta Efficiency (KGE). :param sim: Series with the simulated values. :type sim: pandas.Series :param obs: The Series with the observed values. :type obs: pandas.Series :param missing: string with the rule to deal with missing values. Only "drop" is supported now. :type missing: str, optional :param weighted: Weight the values by the normalized time step to account for irregular time series. Default is False. :type weighted: bool, optional :param max_gap: 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. :type max_gap: int, optional :param modified: Use the modified KGE as proposed by :cite:t:`kling_runoff_2012`. According to the article this ensures that the bias and variability ratios are not cross-correlated, which otherwise may occur when inputs are biased. :type modified: bool, optional .. rubric:: Notes The (weighted) Kling-Gupta Efficiency :cite:t:`kling_runoff_2012` is computed as follows: .. math:: \\text{KGE} = 1 - \\sqrt{(r-1)^2 + (\\beta-1)^2 - (\\gamma-1)^2} where :math:`\\beta = \\bar{x} / \\bar{y}` and :math:`\\gamma = \\frac{\\bar{\\sigma}_x}{\\bar{\\sigma}_y}`. If modified equals True, :math:`\\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. .. !! processed by numpydoc !!