Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Evaluation Tutorial for Link Prediction #3463

Merged
merged 9 commits into from
Nov 5, 2021
Merged

Conversation

BarclayII
Copy link
Collaborator

Description

Add a tutorial section for evaluating link prediction models on link prediction task.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Nov 1, 2021

To trigger regression tests:

  • @dgl-bot run [instance-type] [which tests] [compare-with-branch];
    For example: @dgl-bot run g4dn.4xlarge all dmlc/master or @dgl-bot run c5.9xlarge kernel,api dmlc/master

@@ -218,8 +218,8 @@ def forward(self, g, h):


######################################################################
# Evaluating Performance (Optional)
# ---------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this sentence needs improvement. ", where it treats the node embeddings learned by link prediction via training and evaluating a linear classifier on top of the learned node embeddings."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased it.

######################################################################
# First you need to construct a graph for ``dgl.dataloading.EdgeDataLoader``
# to iterate on, which should have the same nodes as the original
# ``graph``, but the testing node pairs as edges. You also need to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A natural question is then what if a user wants to apply a trained GNN to predict edges for a new graph with a different set of nodes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra empty space after "edges."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion. I rephrased it so I'm not emphasizing that the graph should be the same as original.

@BarclayII BarclayII merged commit c5ae54b into master Nov 5, 2021
@jermainewang jermainewang deleted the link-prediction-eval branch December 3, 2021 08:57
@mokeeqian
Copy link

Is there any problems in link-prediction-eval branch?
I saw you deleted it.

@jermainewang jermainewang mentioned this pull request Jun 27, 2022
38 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants