blindsubmission1 / PEAGNN

Official code for the paper "Leveraging the Metapath and Entity Aware Subgraphs for Recommendation"
GNU General Public License v3.0
40 stars 11 forks source link

Is the code below wrong for me because of the data difference? #5

Open Lee-HyeongBin opened 3 months ago

Lee-HyeongBin commented 3 months ago

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]