diff --git a/include/evalhyd/detail/probabilist/contingency.hpp b/include/evalhyd/detail/probabilist/contingency.hpp index 13f79ab875a4aa17dcb7a76cfa34ebb297417c66..771f7681c80c3edf25f92301ee94ece5e9d524b0 100644 --- a/include/evalhyd/detail/probabilist/contingency.hpp +++ b/include/evalhyd/detail/probabilist/contingency.hpp @@ -514,7 +514,9 @@ namespace evalhyd { // compute the area under the ROC curve // xt::trapz(y, x, axis=4) - auto A = xt::trapz(POD, POFD, 4); + // (note: taking the opposite of the integration results + // because POD/POFD values are in decreasing order) + auto A = - xt::trapz(POD, POFD, 4); // compute the ROC skill score // $SS_{ROC} = \frac{A - A_{random}}{A_{perfect} - A_{random}}$