lyst / lightfm

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

What's a good way to "weight" the importance of item/user features in LightFM? #538

Open freytheviking opened 4 years ago

freytheviking commented 4 years ago

Hey all, I have been using LightFM in an e-commerce application with a decent amount success. Thanks for this really cool package!

I'm in the process of optimizing the recommendation outputs. Because of specific business domain considerations, certain features are "more important" and have less leeway in terms of variability than others, like "price" (i.e. certain recommended items need to be in a soft price range).

From other posts, I have seen that the best way to deal with a numerical item feature like "price" is to discretize it. I have so far used decile bins. Is there also a way for LightFM to weight this feature MORE than the others?.

Thanks in advance!

Edit: I also added this question in stackoverflow

lhaffonso commented 4 years ago

On the documentation the author mentions two ways to pass the item features: (item id, [list of feature names]) or (item id, {feature name: feature weight}). I think the second one is what you are looking for?

zhenliu2012 commented 2 years ago

Hello, have you found a solution to this issue that you could share? I'm wondering if it would make sense to treat the item/user feature weights are parameters and use optimization tools like skopt to optimize them?