Comments (3)
LightFM is designed to be able to deal with this problem.
You do this via user features: as long as each user is described by a set of features and these features are shared between the training and the test set, you will be able to make predictions in the test set.
Suppose you describe each user by their unique id and their country of origin. While training, you estimate parameters for the id feature and the country feature. At test time, you can use the country feature to provide prediction even for a user whose id isn't part of the testing set. (You couldn't do this if you didn't have the country feature, because there would be no way of estimating the representation for a new user.)
This is exactly equivalent to the StackExchange example, but instead of using item features (in this case, question tags) you would use user features (by passing them to the fit and predict methods).
from lightfm.
Does my answer help?
from lightfm.
Hi @maciejkula ,
May I ask your help about the features, as you mentioned we can use ['user_id', 'country'] as features.
supposed we have 1000 user and 100 country, how to construct the features will be better?
- should I normalize them into 1? like user_id == 0.001, country = 0.01
- for small feature, like country, expand it to multiple features, like ['country a', 'country b' ...] and mark the related one to 1, similar to the stackoverflow tags.
- or is there any instruction on how to weight the features? e.g if I define userid from [0, 1000), country [0, 100), will user_id be over weighted 10 times?
thank you
from lightfm.
Related Issues (20)
- Recommendation for users the new items in the dataset HOT 1
- Features importance in lightFM
- Lightfm 1.17 - kernel dies in Jupyter, Spyder when fitting HOT 3
- How to reproduce the evaluation score in the paper.
- Recommender System with RFM ratings to put into Interaction matrix HOT 9
- Feature Request: Support for Freezing Item Embeddings while Updating User Embeddings During Training
- Incorporating item and user biases in LightFM embeddings for accurate recommendations in Vespa HOT 1
- Item and User Normalization
- Is there a way to save Dataset()? HOT 1
- How to get clusters of users from trained lightfm model on implicit rating model?
- Evaluate AUC on a subset of items
- Auc evalutation return always nan
- Can't install on Python 3.10.6 in Ubuntu HOT 1
- Implementing Incremental Training and Feedback loop using Lightfm
- LightFM kills Jupyter Kernel when fitting model
- Does calculating precision@k for one user makes sense? HOT 1
- Creating recommendations for single users without leveraging user identity features
- Can't install on Python 3.12 HOT 6
- Can't seem to install with with poetry HOT 3
- ModuleNotFoundError: No module named 'lightfm._lightfm_fast_no_openmp'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightfm.