Questions tagged [lightfm]
30 questions
3
votes
1 answer
LightFM train_interactions shared among train and test sets: This will cause incorrect evaluation, check your data split
tl;dr: Working with Yelp Dataset to make a recommendation System but running into Test interactions matrix and train interactions matrix share 68 interactions. This will cause incorrect evaluation, check your data split. error when running the…

Shyu
- 71
- 6
2
votes
1 answer
Loss functions in LightFM
I recently came across LightFM while learning to train a recommender system. And so far what I know is that it utilizes loss functions which are logistic, BPR, WARP and k-OS WARP. I did not go through the math behind all these functions. Now what I…

Hasham Mirza
- 23
- 1
- 5
1
vote
1 answer
LightFM how to make predictions for new users (cold start) - user id 8 not in user id mappings
I am building a recommendation system in order to recommend training to employees based on user features and item features which LightFM according to the documentation its a great algorithm.
my user dataframe:
User-Id name age los ou gender …

Luis Valencia
- 32,619
- 93
- 286
- 506
1
vote
0 answers
How to build the dataset.build_item_features for LightFM recommendation model?
I am working on modeling a recommendation system using LightFM and trying to build the dataset on Steam data. My initial part of the code is as below:
dataset = Dataset()
dataset.fit(users = users_data['userID'], items = games_data['id'])
…

user11619814
- 389
- 1
- 6
- 17
1
vote
0 answers
How to build interaction for LightFM fit?
I want to train LightFM with Dataframe shown below.
FromUserID
Title
PostID
Views
Likes
1
Cricket
34
12
8
6
Mobile
37
11
6
3
tv
34
8
5
5
WTC final
30
6
5
I already trained the model with Views column (which is working fine) but…

Mahipal Singh
- 144
- 1
- 11
1
vote
0 answers
Obtaining feature importance/Sensitivity for model interpretability
I'm new to recommender models and I'm using LightFM for a project. I'm creating model for customer like/dislike recommendations (no ratings involved). Are there any options for model interpretability in such cases?
I understand LightFM is a hybrid…

user9291966
- 11
- 3
1
vote
1 answer
Lightfm Incorrect number of features in user_features
I am building recommender system - hybrid in Lightfm.
My data has 39326 unique users and 2569 unique game titles(items).
My train interaction sparce matrix has shape: <39326x2569 sparse matrix of type ''
with 758931 stored…

Ellie Biessek
- 148
- 2
- 14
1
vote
1 answer
How can I do cross validation on user-item interactions matrix for LightFM movie recommender system?
I have an interactions matrix (scipy.sparse.csr_matrix) from movielens dataset with movie ratings from users, and I am building a LightFM model with item_features. Right now I have the matrix divided into train and test, but how do I do…

xxx
- 41
- 5
0
votes
0 answers
My kernel dies when I fit my LightFm model from Microsoft Recommenders
I downloaded the code to run it in my Jupyter Notebook
https://github.com/microsoft/recommenders/blob/main/examples/02_model_hybrid/lightfm_deep_dive.ipynb
When I try to run the LightFm model the kernel dies (On the exact same code from the…

KwstisXD
- 1
0
votes
0 answers
Why am I not getting anything printed out in the terminal while using lightfm in python?
So I am trying to build a recommender system and found out that the library lightfm offers the functionalities to build it. I went to their site and looked into the documentation and I saw some examples that I copied to test and to see what they do.…

All For One
- 1
- 1
0
votes
0 answers
I would like to know how I can obtain, if possible, the MSE and MAE metrics of the lightFM model in python
To evaluate the model, I need to obtain the lightFM model error metrics, specifically the MAE and MSE metrics.
I have found extensive literature on obtaining error metrics for models implemented with scikit-learn and tensorflow libraries, but in the…

CAMILO RUBIO
- 3
- 4
0
votes
0 answers
GridSearchCV with LightFM
I'm a newbie so my apologies if something I ask might be to obvious and my english is not quite good. I'm stuck in doing a custom grid search with cross validation with LightFM which does not come with those functions. It seem the way I split the…

Gianluca Calò
- 11
- 1
0
votes
0 answers
How do i convert a pd df to a sparse matrix for a lightFM recommender without first making a memory-busting non-sparse matrix?
I am building a LightFM recommender in python. I have a pandas dataframe of transactions: each row is a purchase and has a customer and product id. I realise that to build my model I need to convert this to a sparse matrix with 1 row per customer…

Evolving_Richie
- 23
- 5
0
votes
0 answers
LightFM- alternative to save model
I created a recommendation system using lightFM on Google Colab. I want to deploy this model using Node JS. I read this article and tried the method recommended here. It recommended using tensorflow.js. For that the model needed to be saved and this…

Sara
- 1
0
votes
0 answers
Lightfm: how to predict on new user who has interactions with items?
I'm using Lightfm for movie recommendation, my question is quite simple but I can't find the solution to it:
I have trained a model using :
User Feature matrix (Age, gender etc..)
Item Feature Matrix (movie category etc ..)
User Item interactions:…

Bonbon
- 1