Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add an example of fast prediction via BLAS to documentation #427
Comments
|
One of the reasons of the There are tricky balancing issues here:
For that reason I have so far been reluctant to add this to the library. If you're interested, we could add a guide for fast predictions to the documentation? |
|
A scenario which I encountered myself in a couple of projects and which several people I consulted also had is the following:
In this scenario, one needs a function computing recommendations for a batch of users. |
There is already one optimisation PR for predict method: #105
But sometimes one probably can do it in a simpler way (just using numpy with BLAS):
https://github.com/inpefess/lightfm/blob/predict_comparison/examples/batch_predict/predicting_with_matrix_multiplication.ipynb
@maciejkula what do you think about adding another, say predict_numpy/predict_all method like that for batch predictions? If yes, I can prepare a PR from the example code above.