Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

predict_rank method and test set role #190

Closed
jwheatp opened this issue Jun 15, 2017 · 3 comments
Closed

predict_rank method and test set role #190

jwheatp opened this issue Jun 15, 2017 · 3 comments

Comments

@jwheatp
Copy link

jwheatp commented Jun 15, 2017

Hi,

I'm trying to understand deeply how LightFM works. However, a part is still a bit confused for me : it is the predict_rank function.

Here is my question :
Could you explain again, in the predict_rank input, how is structured the test_interactions (compared to train_interactions) frame and what is his role in the function ?
This is what I understood : in the test_set, if we set an interaction to non-zero (for ex. 1) for a user u and an item i, the model will make a recommendation for user u, for all items, and see in which position the item i is ranked.
Am I right ? Maybe I misunderstood the 'rank' definition.

I will start with this question, and I may have other more later :)

Thanks in advance,

Julien

@maciejkula
Copy link
Collaborator

Yes, this is correct. This is a helper function for computing various ranking-related evaluation scores where you need to know the position (in the full ranked list for any given user) of the test interactions.

@jwheatp
Copy link
Author

jwheatp commented Jun 16, 2017

Thanks for your answer.

@jwheatp jwheatp closed this as completed Jun 16, 2017
@dwy904
Copy link

dwy904 commented Oct 19, 2018

How can I calculate the original interaction back and make recommendation? do I just simply do
np.matmul(model_bpr.user_embeddings, model_bpr.item_embeddings.transpose()) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants