RUCAIBox / RecBole

A unified, comprehensive and efficient recommendation library
https://recbole.io/
MIT License
3.27k stars 590 forks source link

Prediction part of the models #1961

Open tripledoubleE opened 6 months ago

tripledoubleE commented 6 months ago

Hello, First of all, thank you for the library you provided. I have some questions about the prediction part of the models

While utilizing the full_sort_scores() and full_sort_topk() functions, we can observe the items predicted by the models. Is there a dedicated function that enables us to retrieve predictions specifically for an individual user? I understand that these functions return a 2D NumPy array, and I believe manipulating the indexes might yield predictions for the desired user. However, in our investigation, we noticed that models, particularly LightGCN, did not generate predictions for every user. In cases where a user had only a single interaction with an item, no predicted items were returned (using the full_sort_topk() function). I hypothesize that the models are making predictions exclusively for users in the test dataset. Could you confirm this, and if so, shed light on how the data_preparation() function, responsible for splitting the dataset into train, test, and validation, handles this separation? Does it consider interactions or users during the process?

Our specific requirement necessitates obtaining predictions for all users. Is there a recommended approach to achieve this?

Your library has been instrumental in our work, and we look forward to further optimizing its use. Thanks in advance.

Fotiligner commented 5 months ago

@tripledoubleE the full_sort_scores() and full_sort_topk() functions are designed for users in test dataset, and you can adjust your datas or specific users into the dataset and input it into the function to get desirable results. Hope this can solve your problems.