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

[WIP] Added Logistic Matrix Factorization(LMF) and Item2Vec models #48681

Open
wants to merge 104 commits into
base: master
Choose a base branch
from

Conversation

ezamyatin
Copy link

@ezamyatin ezamyatin commented Oct 28, 2024

What changes were proposed in this pull request?

In this pull request, I add two important algorithms from the recommendation domain: Logistic Matrix Factorization(LMF) and Item2Vec. Both algorithms inherit the same LogFacBase class and are built under the same optimization backend. The first algorithm is an alternative to the well-known ALS: the key difference is that LMF uses a logistic loss function, while ALS uses a regression function. In most recommendation problems, the logistic loss function is better grounded in theory, so I am sure LMF will be useful to the community.

The second algorithm is actually a large-scale implementation of the SkipGram version of the Word2Vec algorithm with negative sampling. The key difference from the existing Word2Vec implementation in spark is that my proposed implementation allows to train models of any large size, while the existing one is limited by the size of 2Gb. I would like to note that this feature is vital in the area of recommendations, where the size of the inventory can exceed hundreds of millions of items.

Why are the changes needed?

Proposed models are widely used in the industry, large-scale implementation in spark will help thousands of recommendation system developers to improve their services.

Does this PR introduce any user-facing change?

Yes, two new classes will be available for use: LMF and Item2Vec

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the ML label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant