Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Bayesian Personalized Ranking #46

Open
jerry-rubikloud opened this issue Feb 16, 2019 · 1 comment
Open

Support for Bayesian Personalized Ranking #46

jerry-rubikloud opened this issue Feb 16, 2019 · 1 comment

Comments

@jerry-rubikloud
Copy link

Hi there, I'm thinking of contributing codes for BPR. What is the best way to extend the code to handle this optimization in your opinion?

@geffy
Copy link
Owner

geffy commented Feb 17, 2019

Hi @jerry-rubikloud !
I think that we need to implement 2 components:

  1. BPRSampler. It will generate pairs from source data and put them into batch. Example: for N pairs we will have a batch with N*2 samples (2 * i-th are winners, 2 * i + 1-th are losers)
  2. BRPLoss. It will take expanded batch output ([2*N, 1]), convert it to pairs ([N, 2]) and calculate resulting loss.
    This design seems to be easy for implementation and allows to keep FM core routine unchanged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants