HKUDS / RLMRec

[WWW'2024] "RLMRec: Representation Learning with Large Language Models for Recommendation"
https://arxiv.org/abs/2310.15950
Apache License 2.0
321 stars 36 forks source link

How the data is processed and generated with which data and methods. #7

Closed duduke37 closed 4 months ago

duduke37 commented 4 months ago

trn_mat.pkl、tst_mat.pkl、val_mat.pkl Hello, how did you get these three sparse matrices? What data and methods did you use? It seems like you don't have this part of the code? Could you briefly introduce it? And how did you divide the obtained sparse matrices into training, testing, and validation parts? I would like to do this preprocessing work? Thank you very much.

duduke37 commented 4 months ago

This question, I seem to have understood, the sparse matrix is based on the user, item interaction data, but I have a new question, that is, why do you build the json file with a lot of formats\ n and\

Re-bin commented 4 months ago

Hi 👋

Thank you for your interest! The JSON file is written with one Python Dictionary per line using json.dumps(). To convert these lines into dictionary objects in Python, you can use the json.loads() function to parse each line. Thank you for your understanding :)

Best regards, Xubin