-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Remove unnecessary inclusion of self-loops when sampling negative edges #4880
Conversation
Handling self-loops is only useful when negative edges are not provided.
Codecov Report
@@ Coverage Diff @@
## master #4880 +/- ##
==========================================
+ Coverage 82.70% 82.75% +0.05%
==========================================
Files 329 329
Lines 17846 17707 -139
==========================================
- Hits 14760 14654 -106
+ Misses 3086 3053 -33
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Meanwhile, negative_sampling
will not include self-loops in the computation, so we can drop the removal and addition of self-loops here completely. WDYT?
You are right :) |
Handling self-loops is only useful when negative edges are not provided.