Skip to content

Commit

Permalink
Merge pull request #2054 from thaiminhpv/thaiminhpv/correct-MIND-user…
Browse files Browse the repository at this point in the history
…-behavior-history-construction

Correct MIND user behavior history construction
  • Loading branch information
miguelgfierro committed Jan 8, 2024
2 parents 4e9a546 + 08dc249 commit e3e3ee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion recommenders/models/newsrec/io/mind_all_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def init_behaviors(self, behaviors_file):

history = [self.nid2index[i] for i in history.split()]
history = [0] * (self.his_size - len(history)) + history[
: self.his_size
-self.his_size :
]

impr_news = [self.nid2index[i.split("-")[0]] for i in impr.split()]
Expand Down
2 changes: 1 addition & 1 deletion recommenders/models/newsrec/io/mind_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def init_behaviors(self, behaviors_file):

history = [self.nid2index[i] for i in history.split()]
history = [0] * (self.his_size - len(history)) + history[
: self.his_size
-self.his_size :
]

impr_news = [self.nid2index[i.split("-")[0]] for i in impr.split()]
Expand Down

0 comments on commit e3e3ee7

Please sign in to comment.