hello, i think ranking function have problem
Ex: I have worst_similarity is [0.014 0.61 0.27 0.013 0.99 ] => ranking is [3 0 2 1 4], but i think correct ranking is [1 3 2 0 4]
It cause by np.argsort() and you can more at here : https://stackoverflow.com/questions/31910407/numpy-argsort-cant-see-whats-wrong
Thank you!