Skip to content

How are metrics computed in sequential models? Session-based recsys #1300

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

You must be logged in to vote

@elloza Hello, thanks for your attention to RecBole!
The evaluation scheme of RecBole follows "Revel incrementally". i.e. given a session [1,2,3,4,5], we utilize [1] to predict 2; [1,2] to predict 3; [1,2,3] to predict 4; [1,2,3,4] to predict 5. To keep the sequence length consistent, zeros is used as padding item. In evaluation, we only utilize the reveal items of session and we record the real sequence length by item_seq_len.
For example, in GRU4Rec, the output of the sequence is defined as:

  item_seq_emb = self.item_embedding(item_seq)
  item_seq_emb_dropout = self.emb_dropout(item_seq_emb)
  gru_output, _ = self.gru_layers(item_seq_emb_dropout)
  gru_output = self.dense(gru_output)
 …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@elloza
Comment options

@Ethan-TZ
Comment options

@elloza
Comment options

Answer selected by elloza
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