-
Notifications
You must be signed in to change notification settings - Fork 153
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
Implement weighted random walks #140
base: master
Are you sure you want to change the base?
Implement weighted random walks #140
Conversation
11aaf83
to
37e29f0
Compare
This commit implements weighted biased random walks as in the original Node2vec paper. In particular, it adds a new parameter to the `random_walk` function, i.e., `edge_weight`, which allows passing edge weights to the underlying random walk generation procedure. If edge weights are set, the function normalizes them by the node degree and converts the weights into CDFs over given nodes (needed by the rejection sampling method). The implementation of the new rejection sampling method is based on [1]. [1] https://github.com/louisabraham/fastnode2vec/blob/master/fastnode2vec/graph.py#L69 * Update `random_walk` API * Implement weighted rejection sampling on CPU * Implement weighted random walk for GPU (CUDA) * Compute CDFs using C++/CUDA * Add tests for weighted random walks
37e29f0
to
c4154c8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #140 +/- ##
===========================================
- Coverage 100.00% 98.63% -1.37%
===========================================
Files 9 11 +2
Lines 77 146 +69
===========================================
+ Hits 77 144 +67
- Misses 0 2 +2 ☔ View full report in Codecov by Sentry. |
Thank you @pbielak, will have a look ASAP. |
bcda1c7
to
2b63087
Compare
Hi, I am highly interested in this pull request :), is there any way this could be merged? Thanks :) |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
Hello, is there any chance, this will be implemented? |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
Are we planning to ever merge this ? |
This commit implements weighted biased random walks as in the original
Node2vec paper. In particular, it adds a new parameter to the
random_walk
function, i.e.,
edge_weight
, which allows passing edge weights to theunderlying random walk generation procedure. If edge weights are set,
the function normalizes them by the node degree and converts the weights
into CDFs over given nodes (needed by the rejection sampling method).
The implementation of the new rejection sampling method is based on [1].
[1] https://github.com/louisabraham/fastnode2vec/blob/master/fastnode2vec/graph.py#L69
random_walk
API