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

Allow KGEModel.test to collect hits@k for several values of k at once #9935

Open
ACHinrichs opened this issue Jan 13, 2025 · 0 comments
Open
Labels

Comments

@ACHinrichs
Copy link

🚀 The feature, motivation and pitch

Currently, KGEModel.test takes an optional integer-parameter k to calculate hits@k. I would like to collect hits for different ks, e.g. I would like to collect hits@1, hits@10 and hits@100 without having to re-run the model.

In the solution I envision KGEModel.test would take a list of values for the parameter k and instead of the current hits_at_k list it would return a dict with the corresponding hits@k. To maintain backwards compatibility, the current behaviour (int as parameter, list as return) could be maintained, giving k the type int | List[int]

I would be happy to implement the changes myself, if they are indeed desired.

Alternatives

run KGEModel.test multiple times with different values for the parameter k

Additional context

No response

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

No branches or pull requests

1 participant