GithubHelp home page GithubHelp logo

Comments (9)

lesterlitch avatar lesterlitch commented on August 19, 2024 5

Ok I've tidied up and done an example of using NSMlib and Annoy for item and member recommendations. I also did a speed / scaling chart. I haven't worked out how to do a bulk predict yet in order to calculate avg. P@K, but there is a qualitative example.

https://github.com/lesterlitch/misc/blob/master/Light%2Bfm%2Bannoy%2Band%2Bproduct%2Bsearch%2Bexample.ipynb

from lightfm.

musicformellons avatar musicformellons commented on August 19, 2024

Ouch, you closed it after having me in the dark for 5 months... a small comment, please!!

from lightfm.

maciejkula avatar maciejkula commented on August 19, 2024

Sorry! I agree that many applications will have an ANN model to accompany this. However, this is probably best accomplished with an external package.

As to guidance: you're probably right, we could add an example ipython notebook that shows how to do this. Would you like to have a stab at a first draft?

from lightfm.

lesterlitch avatar lesterlitch commented on August 19, 2024

I did a rough example using annoy for item-to-item filtering and an example of maximum inner product search with ball tree. If the approach is sound I could tidy this up for an example?

https://github.com/lesterlitch/misc/blob/master/Light%2Bfm%2Bannoy%2Band%2Bproduct%2Bsearch%2Bexample.ipynb

from lightfm.

maciejkula avatar maciejkula commented on August 19, 2024

Sure, I'd love an example! One thing that might be useful as well is some discussion on the pros and cons of using something like Annoy or NMSlib.

from lightfm.

maciejkula avatar maciejkula commented on August 19, 2024

Great, thanks! Would be great to include this in the examples and integrate in the documentation. Would you mind submitting a PR and we can go from there?

It might even be worth having a lightfm.contrib.ann module and actually build these functions in. I have historically been wary of including heavy(ish) external dependencies, but if we keep them optional it should be fine.

from lightfm.

LongbinChen avatar LongbinChen commented on August 19, 2024

believe it or not, using numpy's matrix multiplication is fast enough for most of the application. with a 256 vector, search from 1 M doc only cost 100ms.

from lightfm.

hammadkhann avatar hammadkhann commented on August 19, 2024

Right now I am trying to use annoy using item embedding and I am confused about how apply my filters on the result and also how to incorporate user embedding while giving recommendations ??? @lesterlitch @maciejkula

from lightfm.

SimonCW avatar SimonCW commented on August 19, 2024

Iā€™m closing this issue because it has been inactive for a long time. If you still encounter the problem, please open a new issue.

Thank you!

from lightfm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.