ibayer / fastFM

fastFM: A Library for Factorization Machines
http://ibayer.github.io/fastFM
Other
1.07k stars 206 forks source link

BPR example #77

Open josepablog opened 7 years ago

josepablog commented 7 years ago

Hello,

I can't seem to find in the documentation an example of using fastFM for ranking. I am trying to use BPR for collaborative filtering with implicit feedback, and I am trying to decide a reasonable sampling strategy for negative examples.

Is there an example available? :)

Thanks, Jose

acc-to-learn commented 7 years ago

random sampling: https://stackoverflow.com/questions/36618259/how-to-use-pythons-fastfm-library-factorization-machines-for-recommendation-t

acc-to-learn commented 7 years ago

Also I have date in data. So should I add negative examples by date? What strategies are there?

ibayer commented 7 years ago

@josepablog Please have a look at the example in issue https://github.com/ibayer/fastFM/issues/71 .

@Damdinov Which non uniform sampling strategy works best depends very much on the dataset. There are however two data independent strategys: i) use the current predictions for adaptive sampling as in [0] ii) use all the negative samples without sampling [1].

Both approaches are not yet implemented in fastFM.

[0] Improving Pairwise Learning for Item Recommendation from Implicit Feedback [1] A Generic Coordinate Descent Framework for Learning from Implicit Feedback