lyst / lightfm

A Python implementation of LightFM, a hybrid recommendation algorithm.
Apache License 2.0
4.66k stars 679 forks source link

How to improve precision? #673

Closed iDataist closed 12 months ago

iDataist commented 1 year ago

I am using LightFM to train a recommender from a media app. The training data (about 92.5M events, 1.2M users, 34k items) is implicit, such as view and click events from the app. I trained a model with the warp loss function (hypterparameters and performance shown below) and used the number of views/clicks as the weight. I scaled the number of interactions (views/clicks) between 0 and 1, using Boxcox transformation. Please let me know if there is anything you would recommend I change or try.

LOSS = "warp" LEARNING_SCHEDULE = "adagrad" NO_COMPONENTS = 21 LEARNING_RATE = 0.25 USER_ALPHA = 1e-06 ITEM_ALPHA = 1e-06 MAX_SAMPLED = 13 NO_EPOCHS = 20 SEEDNO = 42 NUM_EPOCHS = 39

The scores on the test dataset: precision:0.0470 recall: 0.190 auc: 0.977

Any feedback would be greatly appreciated. Thank you for all your work on this package! Hui

dpalbrecht commented 1 year ago

Some things that come to my mind:

akash-kwiff commented 4 months ago

Hi @dpalbrecht ,

Precision (or a MAPK@K) of 0.047 isn't necessarily bad, and can be quite good for a given problem.

Why do you say that? Let's say, K =10, doesn't that mean they have 0 relevant recommendations out of 10? Am i wrong with my understanding?