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

About map the scores to the ranks #28

Open
w-qhai opened this issue Jul 14, 2024 · 0 comments
Open

About map the scores to the ranks #28

w-qhai opened this issue Jul 14, 2024 · 0 comments

Comments

@w-qhai
Copy link

w-qhai commented Jul 14, 2024

Thanks for your work, can you please publish the code of how to map the scores to the levels,
I tried to get the max and min scores from train_koniq.json

Then I tried to map the scores to levels.

max_score = 85.0608108108
min_score = 6.68487394958

delta = (max_score - min_score) / 5

# map score to level
levels = ["bad", "poor", "fair", "good", "excellent"]
if score < min_score + delta:
        ll = 0
    elif score < min_score + 2*delta:
        ll = 1
    elif score < min_score + 3*delta:
        ll = 2
    elif score < min_score + 4*delta:
        ll = 3
    else:
        ll = 4
print(levels[ll])

Most of them are correct, but 74 are wrong.

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

1 participant