guoyang9/NFM-pyorch

turn to pair-wise ranking issue

AmazingDD opened this issue · 1 comments

this NFM implementation is really good, how can I turn this rating prediction method to a pair-wise ranking issue just like the BPR-torch repo u did before?
where should I change the code? loss function or other parts?

Thx.

I don't think pair-wise learning trick under NFM makes much sense. For example, for a positive instance (e.g., <user, item, item category>, you cannot say another negative sampled instance's item category is less relevant than the positive one (because this user may have interaction with this item category).

If you truly want to try the pair-wise learning trick, do maintain a dictionary in data_utils.py for negative sampling in every epoch. Besides, the input instance should be two in this case (positive and negative). As for the loss function, you can refer to my another BPR repo it's similar.