Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LightFM feature normalization descreases precision #10

Closed
dbalabka opened this issue Jun 12, 2020 · 2 comments
Closed

LightFM feature normalization descreases precision #10

dbalabka opened this issue Jun 12, 2020 · 2 comments

Comments

@dbalabka
Copy link

According to this code, LightFM features are normalized by default

I have faced with the issue that normalization decrease model precision with the same epochs counts. The same problem already reported in LightFM repository:
lyst/lightfm#413

As I understood, there no need to normalize one-hot encoded features (e.g., category).

@evfro
Copy link
Owner

evfro commented Jan 7, 2021

@dbalabka hi, thanks for the report. I'd say that it really depends on the data, as I have observed a vice versa effects in some cases. But I totally agree that it should be configurable. I have updated the LightFM wrapper with 2 new attributes for normalization:

normalize=self.normalize_item_features,

normalize=self.normalize_user_features,

You can set them just normally as any other attribute on a wrapper instance of lightfm.

@evfro evfro closed this as completed Jan 7, 2021
@dbalabka
Copy link
Author

dbalabka commented Jan 7, 2021

@evfro thanks for response. It was a while after I have created this ticket. Our recommendations system already implemented using original LightFM code and we run another phase of AB testing. So, this issue became less relevant. Initliay we had an idea to use polara, but decided to use LightFM directly.

We are going to perform more experiments. I suspect that normalization issue related to one-hot encoding approach. There are some discussions in Scikit Learn repository about this topic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants