How can I learn the latent vectors of a new user?
See original GitHub issueHello. I have a question regarding your library.
Let’s suppose that I have already trained a hybrid
model using a user-item rating matrix for training, and also included some user_features
during training.
How can I quickly get the latent features for a new test user (for whom I also have user-features
)? And how to provide top-n recommendations for that new user? Would I have to re-train the model? That would be really slow, right? How does this work exactly?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Understanding Latent Space in Machine Learning
We can understand patterns or structural similarities between data points by analyzing data in the latent space, be it through manifolds, ...
Read more >How to Explore the GAN Latent Space When Generating ...
The generative model in the GAN architecture learns to map points in the latent space to generated images.
Read more >How to get the latent vector as an output from a cnn model ...
You can use get_layer method of the Model class to get a layer by its name, find bellow an example with a dummy...
Read more >Generating Large Images from Latent Vectors | 大トロ - otoro.net
Current cutting edge techniques of image generation from latent vector are generally based on Generative Adversarial Networks (GAN) or ...
Read more >Illustration of the latent feature of users and items.
Matrix factorization characterizes data along each dimension by latent vectors and calculates the similarity between users and items in the latent space through ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found this helpful #210.
Basically in the hybrid model each user is represented by an identity feature, together with all other relevant features for that user. The latent representation is then just the sum of all the feature’s representations. For a new user you don’t have an identity feature, but everything else is exactly the same.
You can create a new
user_features
sparse matrix of size (1,num_of_features
) for the new user, and use it inpredict
. In that case useuser_id=0
when calling the function to indicate that you want to use the first (and only) row in youruser_features
matrix.I believe that with this library you would have to retrain, or at least continue training (
fit_partial
) from your previous model (provided that you pre-prepared additional self-features for the new users).Without additional training all you can do is to generate recommendations based on the user features, or recommend items similar to the items the user has interacted with.