hydrodata.model_evaluation.evaluation_metrics module
Evaluation Metrics
Root Mean Square Error (RMSE)
Pearson Correlation Coefficient (R)
Spearman’s Rank Correlation Coefficient
Nash-Sutcliffe Efficiency (NSE)
Kling-Gupta Efficiency (KGE)
Correlation of determination (R2)
Bias from R
Percent Bias
- hydrodata.model_evaluation.evaluation_metrics.KGE(x, y)
Calculate Kling-Gupta Efficiency (KGE).
Refer to Equation 9 in https://doi.org/10.1016/j.jhydrol.2009.08.003.
- Parameters:
x (array-like of shape (n_samples,)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.NSE(x, y)
Calculate Nash-Sutcliffe Efficiency (NSE).
Refer to https://doi.org/10.1016/0022-1694(70)90255-6.
- Parameters:
x (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.RMSE(x, y)
Calculate RMSE.
Refer to https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_squared_error.html.
- Parameters:
x (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.R_squared(x, y)
Calculate R**2.
Refer to https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html.
- Parameters:
x (array-like of shape (n_samples,)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.bias_from_R(x, y)
Calculate the bias from R.
The bias from R indicates systematic additive and multiplicative biases in the generated values, with a value between 0 and 1, where bias = 1 means no bias. Refer to Equation 16 on the paper (https://www.nature.com/articles/srep19401).
- Parameters:
x (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.pearson_R(x, y)
Calculate Pearson’s R.
Refer to https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html.
- Parameters:
x (array-like of shape (n_samples,)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.percent_bias(x, y)
Calculate percent bias.
- Parameters:
x (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated values.
- Return type:
float or ndarray of floats
- hydrodata.model_evaluation.evaluation_metrics.spearman_rank(x, y)
Calculate Spearman’s Rank Correlation Coefficient.
Refer to https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.spearmanr.html.
- Parameters:
x (array-like of shape (n_samples,)) – Ground Truth (correct) target values.
y (array-like of shape (n_samples,)) – Estimated values.
- Return type:
float or ndarray of floats