Metrics
Goodness of fit metrics for comparing routed discharge against observations.
river_route.metrics
mean_error(y_true, y_pred)
The mean of the simulated minus the observed values: positive when the simulation is too high on average.
mean_absolute_error(y_true, y_pred)
The mean of the absolute differences between the simulated and the observed values.
mean_square_error(y_true, y_pred)
The mean of the squared differences between the simulated and the observed values.
pearson_r(y_true, y_pred)
The Pearson correlation coefficient of the observed and the simulated values.
kling_gupta_efficiency_2012(y_true, y_pred)
Kling-Gupta efficiency per Kling et al. (2012): 1 - sqrt((r - 1)^2 + (beta - 1)^2 + (gamma - 1)^2), with r the correlation, beta the ratio of the simulated to the observed mean, and gamma the ratio of the simulated to the observed coefficient of variation. 1 is a perfect simulation. NaN when either series is constant or has a mean of zero, where a coefficient of variation is undefined.