-
Notifications
You must be signed in to change notification settings - Fork 427
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
How to predict in sequential models ? #172
Comments
|
In the above, how would we get the topk predictions per user? i.e for the last item in a sequence, I would want the top k predictions, not just the last x predictions? |
The predict function only needs a (sorted) array of item indices as input to recommend the "next best items" given the input sequence. It doesn't need any reference of the user_id or session_id, because it encodes the input sequence in the embedding space and then it matches its representation with the items one, using the dot product operator.
|
I am trying to predict the implicit sequential model.
Now I use the following code to train:
from spotlight.sequence.implicit import ImplicitSequenceModel
But after this lets say i want to predict for "user_ids" (one hot encoded at the top) 1000, I dont know how to use the predict function.
As per my understanding, predict function should take the input of sequence for that user, but how to find out that sequence for that user?
sequential_interaction
when used with.sequences()
doesnt give me which row belongs to which user.Can you please provide an example to use predict on this data ? Any example using implicit sequence model would be helpful.
Thanks
The text was updated successfully, but these errors were encountered: