benfred / implicit

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

Fix for recommend with 'items' filter #507

Closed benfred closed 2 years ago

benfred commented 2 years ago

When using the 'items' filter on the recommend calls, we had two different bugs in the latest code. One was that if you specified a 'N' value greater than the size of the items you were ranking, the results contained invalid values. The other was that we weren't properly handling the 'filter_already_liked' option when the 'items' option was set for MF models. Fix and add a unittest that would have caught this