-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hello, my name is Lee and I am working as a developer in Korea.
I looked at your paper code and checked 'the code below is wrong to me' while applying it to the contest dataset.
genre_nids = [self.e2nid_dict['genre'][genre] for genre in self.unique_genres if movies[movies.iid == iid][genre].item()]
feat_nids += genre_nids
If you write the code as below,
it'll fill in the self.e2nid_dict['genre'][genre] if the movie's genre item exists while processing 'for'.
Therefore, if the movie's genre item exists, the genre_nids will be filled like this.
print(self.unique_genres)
# ['comedy', 'action', 'eros', 'drama']
print(genre_nids)
# [3056, 3057, 3058, 3059]
By the way, isn't the result intended when you designed the code below?
(If the movie is Avengers (action movie))
print(genre_nids)
# [3057]