Questions tagged [lightfm]

30 questions
0
votes
0 answers

Evaluating LightFM model performance with lightfm.evaluation.precision_at_k

I am trying to use lightfm.evaluation.precision_at_k() to evaluate performance of my model. My questions are around the parameters that I need to pass to it: Does the test_interactions parameter needs to be the exact same shape (user indexes…
0
votes
0 answers

When I give the train + test set I get a precision above 1 (LightFM)

I am implementing a recommender system (python 3.9) for an online supermarket (hence users can re-order products). All the data is in the correct format which led to an interaction matrix, a weights matrix (to show the importance of some of the…
0
votes
0 answers

What is the correct way to handle cross sectional features in lightFM recommender model

UPDATED QUESTION I am trying to build a hybrid recommender system in python based on the lightFM library. The input data contains information on users, actions (things I am trying to recommend) and binary ratings. I also have user features that are…
bmasri
  • 354
  • 1
  • 11
0
votes
0 answers

How to understand the dimensions of Sparse matrix (Compressed Sparse Row format) generated in lightFM to map it to #features?

I am working on a lightFM hybrid recsys model with both user and item metadata features. These user and item features are of the format: (0, [feature1, feature2, ... feature n]) and applying them into dataset.build_user_features() and a sparse…
0
votes
1 answer

LightFM model: scores and sigmoid function inside

I have two questions related to the LightFM model: I read the article about the model and I see that it uses sigmoid f(.)-function. I also checked library's Cython code and I see that the function is implemented there as well. However, the model is…
0
votes
1 answer

DataError: No numeric types to aggregate pandas pivot

I have a pandas dataframe like this: User-Id Training-Id TrainingTaken 0 4327024 25 10 1 6662572 3 10 2 3757520 26 10 and I need to convert it to a Matrix like they do…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
0
votes
1 answer

ValueError: The user feature matrix specifies more features than there are estimated feature embeddings: 19400 vs 81728

I have the following datasets: Users: 10.000 Rows. Features: User-Id, name, age, los, ou, gender, skills, language, grade, career interests Trainings: Training-Id, training name, main skill Trainings Taken User-Id, Training-Id,…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
0
votes
2 answers

how to make an integer index corresponding to a string value?

I'm currently building a recommender system using Goodreads data. I want to change string user ids into integers. Current user ids are like this: '0d688fe079530ee1fe6fa85eab10ec5c' I want to change it into integers(e.g. 1, 2, 3, ...), to have the…
Serious
  • 13
  • 3
0
votes
1 answer

Unable to install Lightfm

This is the error that I'm getting whenever I try to install a certain few libraries. I have tried updating my pip to the latest version. And I'm using python 3.8.5 C:\Users\Deep\Desktop\Sentiment Analysis>pip install lightfm Collecting lightfm …
0
votes
0 answers

What's a good way to "weight" the importance of item/user features in LightFM?

I have been using LightFM in an e-commerce application with a decent amount success. Thanks for this really cool package! I'm in the process of optimizing the recommendation outputs. Because of specific business domain considerations, certain…
Max
  • 71
  • 1
  • 1
  • 6
0
votes
1 answer

Proper way to setup user-item interactions data in lightfm

What is the right way to setup the data when feeding to lightfm model for cases where I have additional implicit data on additional items/products. For example, I have 100k users x 200 items interaction data, however in real application, I want the …
bninopaul
  • 2,659
  • 4
  • 15
  • 22
0
votes
1 answer

Standard Collaborative Filtering vs Hybrid Light FM

I'm new to recommender system and trying to understand the fundamental difference between standard collaborative filtering (CF) and hybrid methods like LightFM. As I researched online, most of the posts mentioned hybrid method combines both CF and…
0
votes
1 answer

lightfm error: Not all estimated parameters are finite, your model may have diverged

I'm running this very simple code: def csr_values_analysis(values): num_zeros = 0 num_ones = 0 num_other = 0 for v in values: if v == 0: num_zeros += 1 elif v == 1: num_ones += 1 else: …
frb
  • 3,738
  • 2
  • 21
  • 51
-1
votes
2 answers

predict new user using lightfm

I want to give a recommendation to a new user using lightfm. Hi, I've got model, interactions, item_features. The new user is not in interactions and the only information of the new user is their ratings.(list of book_id and rating pairs) I tried to…
Serious
  • 13
  • 3
-3
votes
1 answer

Recommendations are coming same before and after fit_partial for new interactions for any user lightfm

for any user let's say some new interactions come then I am fitting the dataset and model with only new interactions data using partial_fit and I am getting the same results before and after partial fit for that user.
Lalit Vyas
  • 221
  • 5
  • 19
1
2