implicit icon indicating copy to clipboard operation
implicit copied to clipboard

Excluding some negatives from training

Open mmosc opened this issue 3 years ago • 0 comments

Hi!

First of all, thank you for this great library!

I'm currently using it for extending and comparing some matrix factorisation models for recommendation. I am working on the LFM-2b dataset.

For design reasons, part of my interaction matrix (or rather an extended version of it) consists of a block of zeros, which however should NOT be considered while training.

To explain things better, I want to train on a matrix like this: inter_matrix with A, B, C being sparse matrices and 0 being an empty matrix. The model should NOT use the entries of the bottom-right block for training.

In my understanding, with respect to ALS, this would mean that in the cost function given by als the sum over u, i should leave the elements of the lower-right block out.

If we imagine to be using BPR instead, the negative samples should never belong to this block.

Is there a way to do this?

Thanks :) Marta

mmosc avatar Mar 11 '22 15:03 mmosc