nwm_metrics.metric_functions#
Module containing functions to calculate various metrics for evaluating hydrological model performance.
- Functions:
treat_values: Preprocess time series data by removing negative values, NaN values, and replacing zero values.
pearson_corr: Calculate Pearson correlation coefficient and p-value between observed and simulated values.
mean_abs_error: Calculate mean absolute error between observed and simulated values.
root_mean_squared_error: Calculate root mean squared error or mean squared error between observed and simulated values.
rmse_std_ratio: Calculate the ratio of RMSE to the standard deviation of observed values.
percent_bias: Calculate percent bias between observed and simulated values.
nse: Calculate Nash-Sutcliffe efficiency, with options for logarithmic transformation and normalization.
weighted_nse: Calculate a weighted average of NSE and logarithmic NSE.
kge: Calculate Kling-Gupta efficiency between observed and simulated values.
pbias_fdc: Calculate percent bias of flow duration curve segments (high, medium, low flow) based on exceedance probabilities.
categorical_score: Calculate categorical scores (POD, FAR, CSI, FBIAS) based on a specified threshold.
calculate_metrics: A wrapper function to calculate multiple metrics at once based on user-specified metric names.
Functions
Compute all statistical metrics between simulation and observation. |
|
Compute probability of detection (POD), probability of false_alarm (FAR), cirtical success index (CSI) and frequency bias (FBIAS). |
|
Get threshold value based on the specified threshold type and value. |
|
Compute Kling-Gupta efficiency between simulation and observation. |
|
Compute mean absolute error between simulation and observation. |
|
Compute Nash-Sutcliffe efficiency. |
|
Compute percent bias of flow duration curve (FDC) high-segment volume, midsegment slope and low-segment volume according to Yilmaz et al (2008). |
|
Compute mean squared error, or optionally root mean squared error. |
|
Compute mean squared error, or optionally root mean squared error. |
|
Compute ratio of RMSE between simulation and observation to standard deviation of observation. |
|
Compute root mean squared error, or optionally mean squared error. |
|
Remove NaN, inf and negative values, and replace zero values of time series. |
|
Compute weighted average of NSE of raw time series and NSE of logrithmic time series. |