Closed phbradley closed 9 months ago
Hi Phil,
Thank you very much for comment. Indeed you are right, this a mistake. I only added the ranks last minute for the sake of the github. Thanks a lot, it should be corrected now.
Barthelemy
Great-- thanks for looking into it!
Hi there,
Thanks for creating this code and making it available! I've been playing around with the notebook and it seems like the ranks don't correlate with the scores in the final output (I added the score column to see what they looked like). I think the issue may be with the line
ranks = np.argsort(scores[::-1])
I wonder if you might instead want something like
ranks = np.argsort(np.argsort(scores)[::-1])
Sorry if I'm mixed up about how the code works. I just started playing with things! Also I'm not 100% sure which way you want to sort the scores; this assumes higher scores are better.
Take care, Phil
PS. It looks like the same issue may be present in predict.py too.
https://math.stackexchange.com/questions/3607762/why-does-sorting-twice-produce-a-rank-vector