Skip to content

How to access user/item features in sequential model? #1053

Answered by Ethan-TZ
Li-Muyang asked this question in Q&A
Discussion options

You must be logged in to vote

@Li-Muyang Hello, thanks for your attention to RecBole!
In this case, you may use external_id to retrieve items.In RecBole, we will remap the item_id,and use the internal_id to index the items
.You can refer to issue979 for the concepts of external_id and internal_id.In particular, you can get the information of these two items through the following code:

# you can use dataset.token2id to transfer external user token to internal user id
    iid_series = dataset.token2id(dataset.iid_field, ['32', '48'])
    info = dataset.item_feat[iid_series]

Their class tokens are [14,0,0,0,0,0].

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Li-Muyang
Comment options

Answer selected by Li-Muyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants