Performance metrics¶
Model-performance metrics comparing observed and simulated series.
- class pyrunoff.metrics.KgeResult(kge, corr_coef, gamma, beta)[source]¶
Bases:
objectKling–Gupta Efficiency score and its component statistics.
- Parameters:
- pyrunoff.metrics.nse(observed_data, simulated_data, use_low_flow_transform=False, low_flow_percentile=25)[source]¶
Calculate the Nash–Sutcliffe Efficiency (NSE).
The series are aligned by index, and pairs with a missing value are omitted.
- Parameters:
observed_data (Series) – Observed values indexed by time.
simulated_data (Series) – Simulated values indexed by time.
use_low_flow_transform (bool) – Whether to apply the log-sinh transform before calculating the metric.
low_flow_percentile (float) – Percentile of positive observed values used as the transform scale. Must be between 0 and 100; the default is 25.
- Returns:
NSE value, or
numpy.nanwhen observed values have zero variance.- Return type:
- pyrunoff.metrics.kge(observed_data, simulated_data, use_low_flow_transform=False, low_flow_percentile=25)[source]¶
Calculate the 2012 Kling–Gupta Efficiency (KGE′) and its components.
The series are aligned by index, and pairs with a missing value are omitted.
- Parameters:
observed_data (Series) – Observed values indexed by time.
simulated_data (Series) – Simulated values indexed by time.
use_low_flow_transform (bool) – Whether to apply the log-sinh transform before calculating the metric.
low_flow_percentile (float) – Percentile of positive observed values used as the transform scale. Must be between 0 and 100; the default is 25.
- Returns:
KGE′ score and component statistics. Undefined results are represented by
numpy.nanvalues.- Return type: