lightfm icon indicating copy to clipboard operation
lightfm copied to clipboard

Score decreases when features normalization enabled

Open dmirecki opened this issue 5 years ago • 2 comments

Hi,

I train my LightFM model with no features for both users and products (I create a pure interaction matrix) based on implicit interactions. I score my model using mean average precision. In one of my experiments, I tried to add one feature for every user (one-hot encoded, so I added ~10 columns to the user features matrix - I built it using Dataset class). Unfortunately, after this operation, my score decreased about 2 times. Interestingly, when I set normalize=False in build_user_features method, the score returned to the previous value (approximately).

Am I doing something wrong or is it a well-known effect that the score drastically decreases after normalization? Why?

Parameters for my model: no_components=150, learning_rate=0.06, loss='warp'. I trained the model with ~750 000 users and ~200 000 products.

dmirecki avatar Feb 04 '19 12:02 dmirecki

This is a little unusual, but nothing I would worry about as long as you can find a solution through other settings.

maciejkula avatar Feb 05 '19 06:02 maciejkula

This one probably related to https://github.com/lyst/lightfm/issues/486

dbalabka avatar Sep 28 '20 17:09 dbalabka