Open SergeyPetrakov opened 12 months ago
@SergeyPetrakov Thanks for your attention to RecBole! For the first question, we use the test_dataset because it contains all historical interaction information for each user in the whole dataset (including train, val and test). We use this information to filter out the user's previous interactions and we don't use any items in the test_dataset. For the second question, we will set the scores of items that have been interacted with in the extracted historical interaction information to -inf in the matrix to filter them out. Therefore, items that the user has not interacted with will be retained.
Hello!
In issue https://github.com/RUCAIBox/RecBole/issues/1848 I asked about the process of extraction of recommendations for a particular list of user ids and that works perfectly fine.
Now I have a questions about the particular items of a recommendation for a particular user id. My general misundestanding for now relates to the set of items that are actually used in recoms in functions below. Correct me if I do a mistake, but as far as I understand by now the main functions that we use for recommendations for a particular list of users - we do the following:
suppose that we work with original mode, not sequential, then the first step is to construct interaction (user ids) and we achieve this via command (if we do not use sequential recoms)
as a results in nu case input_interaction.numpy() gives {'user_id': array([23033, 10512, 609])} so these are id provided by model but not the initial token ids and after turning it to device it is used the following command:
that in fact does vector multiplication between particular user embedding and all item embeddings. And since all models use this function to predict rating the approach is equivalent
(for my example I received something like this
)
So the question - please could you a little bit clarify the process. I thought that the ideal case is when We have some list of users with their ids, and for them predicts ratings for the items that they did not interact before (since for recommendation purpose we are not interested in recommending an item with which user interacted before). But following this code I have a misunderstanding which set of items we actually use. On the one hand I see that we use dataset = test_data.dataset, that is why it is likely that items from tests are also used, but in fact there are could be items in test that users have interacted already. On the other hand I see all_item_e = self.item_embedding.weight command gives a point of using all the items. Could you please clarify which items are actually using for recommendations and if all items are used what d you think is the efficient way for a particular user to drop items that he or she has interacted before
(For reference)