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

Implement weighted random walks #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pbielak
Copy link
Contributor

@pbielak pbielak commented Aug 10, 2022

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

@pbielak pbielak force-pushed the dev/pbielak/implement-weighted-random-walks branch 2 times, most recently from 11aaf83 to 37e29f0 Compare August 10, 2022 15:12
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
@pbielak pbielak force-pushed the dev/pbielak/implement-weighted-random-walks branch from 37e29f0 to c4154c8 Compare August 10, 2022 15:33
@rusty1s rusty1s added the enhancement New feature or request label Aug 10, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.63%. Comparing base (cc4696b) to head (2b63087).
Report is 26 commits behind head on master.

❗ 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.
📢 Have feedback on the report? Share it here.

@rusty1s
Copy link
Owner

rusty1s commented Aug 11, 2022

Thank you @pbielak, will have a look ASAP.

@Alvaro-Ciudad
Copy link

Hi, I am highly interested in this pull request :), is there any way this could be merged? Thanks :)

@github-actions
Copy link

This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity.

@github-actions github-actions bot added the stale label Aug 15, 2023
@github-actions github-actions bot closed this Aug 29, 2023
@rusty1s rusty1s reopened this Aug 29, 2023
@github-actions github-actions bot removed the stale label Aug 30, 2023
@AmosDinh
Copy link

AmosDinh commented Oct 11, 2023

Hello, is there any chance, this will be implemented?

Copy link

github-actions bot commented Apr 9, 2024

This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity.

@github-actions github-actions bot added stale and removed stale labels Apr 9, 2024
@thunderock
Copy link

Are we planning to ever merge this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants