fastFM icon indicating copy to clipboard operation
fastFM copied to clipboard

BPR example

Open josepablog opened this issue 8 years ago • 3 comments

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

josepablog avatar Nov 23 '16 01:11 josepablog

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

acc-to-learn avatar Nov 23 '16 05:11 acc-to-learn

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

acc-to-learn avatar Nov 23 '16 07:11 acc-to-learn

@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

ibayer avatar Nov 23 '16 08:11 ibayer