wolfhece.compare_series
Module Contents
- wolfhece.compare_series.Nash_Sutcliffe_efficiency(observed, simulated)[source]
Calculate the Nash-Sutcliffe efficiency coefficient (NSE) between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Nash-Sutcliffe efficiency coefficient.
- wolfhece.compare_series.Kling_Gupta_efficiency(observed, simulated)[source]
Calculate the Kling-Gupta efficiency coefficient (KGE) between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Kling-Gupta efficiency coefficient.
- wolfhece.compare_series.modified_Kling_Gupta_efficiency(observed, simulated)[source]
Calculate the modified Kling-Gupta efficiency coefficient (KGE’) between observed and simulated data.
A modified Kling-Gupta efficiency was proposed by Kling et al. (2012). The coefficient of variation is used instead of the standard deviation to ensure that bias and variability are not cross-correlated
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The modified Kling-Gupta efficiency coefficient.
- wolfhece.compare_series.modified_Kling_Gupta_efficiency_Spearman(observed, simulated)[source]
Calculate the modified Kling-Gupta efficiency coefficient (KGE’) between observed and simulated data.
A modified Kling-Gupta efficiency was proposed by Kling et al. (2012). The coefficient of variation is used instead of the standard deviation to ensure that bias and variability are not cross-correlated
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The modified Kling-Gupta efficiency coefficient.
- wolfhece.compare_series.Normalised_Diagnostic_efficiency(observed, simulated)[source]
Calculate the Diagnostic efficiency coefficient (DE) between observed and simulated data.
Schwemmle et al. (2021) used Flow Duration Curve (FDC)-based parameters to account for variability and bias in another KGE variant: the diagnostic efficiency. This criterion is based on constant, dynamic, and timing errors and aims to provide a stronger link to hydrological processes (Schwemmle et al., 2021)
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Diagnostic efficiency coefficient.
- wolfhece.compare_series.Liu_mean_efficiency(observed, simulated)[source]
Calculate the Liu mean efficiency coefficient (LME) between observed and simulated data.
The Liu mean efficiency is a variant of the Nash-Sutcliffe efficiency that accounts for the mean of the observed data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Liu mean efficiency coefficient.
- wolfhece.compare_series.Lee_Choi_mean_efficiency(observed, simulated)[source]
Calculate the Lee-Choi mean efficiency coefficient (LCME) between observed and simulated data.
The Lee-Choi mean efficiency is a variant of the Nash-Sutcliffe efficiency that accounts for the mean of the observed data and is less sensitive to outliers.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Lee-Choi mean efficiency coefficient.
- wolfhece.compare_series.Dynamic_Time_Warping_distance(series1, series2)[source]
Calculate the Dynamic Time Warping (DTW) distance between two time series.
The time series can be of different lengths, and DTW finds the optimal alignment between them by minimizing the distance.
- Parameters:
series1 – First time series as a list or numpy array.
series2 – Second time series as a list or numpy array.
- Returns:
The DTW distance between the two time series.
- wolfhece.compare_series.Dynamic_Time_Warping_distance_normalized(series1, series2)[source]
Calculate the normalized Dynamic Time Warping (DTW) distance between two time series.
The DTW distance is normalized by the length of the path to provide a relative measure.
- Parameters:
series1 – First time series as a list or numpy array.
series2 – Second time series as a list or numpy array.
- Returns:
The normalized DTW distance between the two time series.
- wolfhece.compare_series.Root_Mean_Square_Error(observed, simulated)[source]
Calculate the Root Mean Square Error (RMSE) between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The RMSE value.
- wolfhece.compare_series.Mean_Absolute_Error(observed, simulated)[source]
Calculate the Mean Absolute Error (MAE) between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The MAE value.
- wolfhece.compare_series.Mean_Absolute_Percentage_Error(observed, simulated)[source]
Calculate the Mean Absolute Percentage Error (MAPE) between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The MAPE value.
- wolfhece.compare_series.Pearson_Correlation_Coefficient(observed, simulated)[source]
Calculate the Pearson correlation coefficient between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Pearson correlation coefficient.
- wolfhece.compare_series.Spearman_Rank_Correlation_Coefficient(observed, simulated)[source]
Calculate the Spearman rank correlation coefficient between observed and simulated data.
- Parameters:
observed – Array-like structure containing observed data values.
simulated – Array-like structure containing simulated data values.
- Raises:
ValueError – If the lengths of observed and simulated data do not match.
- Returns:
The Spearman rank correlation coefficient.