benfred / implicit

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

recommend_all() function keeps cpu usage on 100% during recommendation. #625

Closed hemmat1991 closed 2 years ago

hemmat1991 commented 2 years ago

i try use recommend_all() function over 10 million data. during the prediction, the CPU usage was 100% But hopefully, the process did not kill by the OS. is there any solution to reduce the CPU usage?

benfred commented 2 years ago

Depending on the size of your dataset, getting recommendations for all users can be quite expensive. This is because for each user, it has to calculate the scores for each item - and then return the top K best items for that user. For many datasets generating the recommendations will be much more expensive than training the model

There are some approaches to speed this up: