Skip to content

ml-100k Data-set output embedding corresponding problem #981

Answered by Sherry-XLL
slightlyLLL asked this question in Q&A
Discussion options

You must be logged in to vote

@slightlyLLL Hello, RecBole will add [PAD] for all the token like fields. Thus after remapping ID, 0 will be reserved for [PAD], which makes the result of Dataset.item_num and Dataset.user_num more than the actual number.

Note that for Knowledge-based models, we add one more relation called U-I Relation. It describes the history interactions which will be used in recbole.data.dataset.kg_dataset.KnowledgeBasedDataset.ckg_graph(). Thus the result of KGDataset.relation_num is two more than the actual number of relations.

Therefore, if you want to get the embeddings of users and items and save them, just skip the first embedding. Thanks for your attention to RecBole!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sherry-XLL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
FAQ Frequently Asked Questions
2 participants