Skip to content
Discussion options

You must be logged in to vote
  1. pos_edge_label_index and neg_edge_label_index denote the positive and negative links which are used for training the model via supervision. pos_edge_label and neg_edge_label hold their ground-truth labels (1 and 0, respectively). As such, you can train VGAE via
z = model(x, edge_index)  # obtain node embeddings

pos_loss = compute_loss((z[pos_edge_index_label[0]] * z[pos_edge_index_label[1]]).sum(dim=-1), pos_edge_label)
neg_loss = compute_loss((z[neg_edge_index_label[0]] * z[neg_edge_index_label[1]]).sum(dim=-1), neg_edge_label)
  1. Yes, the output is a dense adjacency matrix which holds the probability of link existence. For obtaining a binary adjacency matrix, you must choose a threshol…

Replies: 2 comments

Comment options

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

You must be logged in to vote
0 replies
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