Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ranking function maybe incorrect? #1

Open
phuctd99 opened this issue Sep 10, 2021 · 2 comments
Open

ranking function maybe incorrect? #1

phuctd99 opened this issue Sep 10, 2021 · 2 comments

Comments

@phuctd99
Copy link

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!

@Glitchfix
Copy link
Owner

you are right I have fixed this issue already, I forgot to push the changes.
will do that and update it as soon as possible.

@d-saikrishna
Copy link

Please change the ranking function to this:

def ranking(self, data):
        temp = np.flip(data.argsort())
        ranks = np.arange(len(data))[temp.argsort()]
        return ranks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants