benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.57k stars 612 forks source link

Consider exposing evaluation functions #540

Closed jperiodlangley closed 2 years ago

jperiodlangley commented 2 years ago

Hi,

I've been using the implicit library for some exploratory work, and noticed that the implicit.evaluation functions are not exposed publicly. I have my own version of the train_test_split, precistion_at_k, and auc_at_k - but likely much slower than your cython implementation. Do you think it would be advisable to expose the evaluation functions, or make them available through a model?

I would be happy to provide a pull request and help test if you think this is advisable.

ita9naiwa commented 2 years ago

Sorry for late response.

you can see code here; https://github.com/benfred/implicit/blob/main/implicit/evaluation.pyx

you can wrap your recommendation module to be compatible with evaluation modules here and you can plug it in.

jperiodlangley commented 2 years ago

Thanks for doing this! I appreciate it.