Skip to content
Discussion options

You must be logged in to vote

Hi @jameswpm,

Solution:

  1. You're not using the probabilities to compute pred_labels. Replace pred in pred_labels = (pred > threshold ).long() with probabilities.
  2. I would recommend you look at your chosen threshold.

I added your code (with minor modifications) to the Google Colab notebook shared by the PyG team for this dataset and it worked fine.

from tqdm.auto import tqdm

model = model.cpu() 
model.eval() 

total_users = len(unique_user_id) 
total_movies = len(movies_df) 
threshold = 0.5
predictions = {} 

for user_id in tqdm(range(0, total_users)): 
    user_row = torch.tensor([user_id] * total_movies) 
    all_movie_ids = torch.arange(total_movies) 
    edge_label_index = torch.stack([u…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jameswpm
Comment options

You must be logged in to vote
2 replies
@devanshamin
Comment options

@jameswpm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants