fix spearman rank correlation calculation for KGENP and KGENP_D
As mentioned in https://github.com/xtensor-stack/xtensor/issues/2677, when the observations and/or predictions contain ties, the default (and fastest) C++ algorithm (std::sort
) does not guarantee the order of equal elements, which results in different values for the spearman rank correlation component of the non-parametric version of KGE.
To fix this, the C++ algorithm (std::stable_sort
) needs to be used instead, so that the order of equal elements is guaranteed. I have proposed a fix via a PR to xtensor
(https://github.com/xtensor-stack/xtensor/pull/2681) that is awaiting approval. Until then, KGENP and KGENP_D will not be available (31cf8da5).