QUESTION:lightFM,predict()
See original GitHub issueHi,Maciej! I would like to ask how predict() is calculated? I think it should be like this, like user 1 for item 1:
user_biases = model.get_user_representations()[0]
user_embeddings = model.get_user_representations()[1]
item_biases = model.get_item_representations()[0]
item_embeddings = model.get_item_representations()[1]
user1 = user_embeddings[0]
item1 = item_embeddings[0]
score = u1.dot(i1.T)
ub1 = user_biases[0]
ib1 = item_biases[0]
result = score + ub1 + ib1
However, the calculation result is inconsistent with predict(1,[1]), please answer the wrong place, thank you for your reply!
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
predict new user using lightfm - python - Stack Overflow
I was having the same problem, What I did was. Created a user_features matrix (based on their preferences) using Dataset class
Read more >Item cold-start: recommending StackExchange questions
A hybrid model . We can do much better by employing LightFM's hybrid model capabilities. The StackExchange data comes with content information...
Read more >How I would explain building “LightFM Hybrid Recommenders ...
Worked example to build user/item features to tackle the cold start problem and predict ratings for new users. Note: The 5-yr old must...
Read more >lightfm-rec/Lobby - Gitter
https://stackoverflow.com/questions/50086764/python-lightfm-valueerror-the-user- ... When I call model.predict() passing in the user ID and the item ID, ...
Read more >LightFm - replicate precision@k score with predict vs ...
Ask Question. Asked 2 years, 1 month ago. Modified 2 years ago ... LightFm has two methods to predict: predict() and predict_rank() ....
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
for example: There are 943’s user and 1682’2 item in movielens100k, model.predict(943,[1]) or model.predict(1,[1682]) will error. So, model.predict(942,[1]) is user943 to item0.
This passes, using your code from above, fixing variables
u1 -> user1
andi1
toitem1
: