benfred / implicit

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

Control model.recommend parameters from evaluation.precision_at_k #178

Open FloMa91 opened 5 years ago

FloMa91 commented 5 years ago

Hi,

first of all thank you for this great package! What would you say about adding kwargs to the precision_at_k function to control the parameters of the recommend function? Or simply adding the parameters of the recommend function to the precision_at_k function...

This would be very helpful in the case, for example if need recommendations with filter_already_liked_items = True. Currently this is not possible with the precision_at_k function.

mohjeih commented 5 years ago

Perhaps, you would implement your own precision_at_k method and simply call it after getting the recommendation list to compute the precision. That is what I have done on my end.