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

EgoNet #1365

Merged
merged 34 commits into from
Feb 4, 2021
Merged

EgoNet #1365

merged 34 commits into from
Feb 4, 2021

Conversation

afender
Copy link
Member

@afender afender commented Jan 29, 2021

Description

Let the egonet graph of a node x be the subgraph that includes the neighborhood of x and all edges between them. Here is a basic description (1-hop, single seed) :

  • Add center node x to the graph.
  • Go through all the neighbors y of this center node x, add edge (x, y) to the graph.
  • For each neighbor y of center node x, go through all the neighbors z of center node x, if there is an edge between y and z in the original graph, add edge (y, z) to our new graph.

Proposed solution

Rather than doing custom one/two hops features, we propose a generic k-hops solution leveraging BFS with cutoff to identify neighbors within a given radius.

In addition to the single source version (matching what's available in Nx), we propose to handle multiple sources (seeds) at once which allows better performances.

This PR also enables a path in the experimental stack for returning multiple graphs (edge list format) from CUDA prims to python without using the legacy classes.

As future work, we want to enable concurrency for the cutoff BFS for each seed. This is dependent of #957

Close #475

@afender afender added feature request New feature or request 2 - In Progress non-breaking Non-breaking change labels Jan 29, 2021
@afender afender added this to the 0.18 milestone Jan 29, 2021
@afender afender requested a review from BradReesWork January 29, 2021 22:46
@afender afender self-assigned this Jan 29, 2021
@afender afender requested review from a team as code owners January 29, 2021 22:46
@afender afender marked this pull request as draft January 29, 2021 22:46
@codecov-io
Copy link

codecov-io commented Feb 3, 2021

Codecov Report

Merging #1365 (ca5b3b3) into branch-0.18 (2fb0725) will increase coverage by 0.50%.
The diff coverage is 66.66%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.18    #1365      +/-   ##
===============================================
+ Coverage        60.38%   60.88%   +0.50%     
===============================================
  Files               67       68       +1     
  Lines             3029     3096      +67     
===============================================
+ Hits              1829     1885      +56     
- Misses            1200     1211      +11     
Impacted Files Coverage Δ
python/cugraph/centrality/__init__.py 100.00% <ø> (ø)
python/cugraph/link_analysis/pagerank.py 100.00% <ø> (ø)
python/cugraph/comms/comms.py 34.52% <25.00%> (ø)
python/cugraph/dask/common/input_utils.py 23.07% <28.57%> (+1.14%) ⬆️
python/cugraph/utilities/utils.py 66.92% <30.76%> (-4.63%) ⬇️
python/cugraph/dask/common/mg_utils.py 37.50% <38.09%> (-2.50%) ⬇️
python/cugraph/community/spectral_clustering.py 72.54% <38.46%> (-11.67%) ⬇️
python/cugraph/structure/number_map.py 59.20% <50.00%> (+3.24%) ⬆️
python/cugraph/structure/graph.py 66.99% <76.47%> (+0.19%) ⬆️
python/cugraph/community/egonet.py 91.42% <91.42%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5813559...8f7921f. Read the comment docs.

@Iroy30 Iroy30 requested a review from rlratzel February 3, 2021 22:02
@afender afender marked this pull request as ready for review February 4, 2021 15:43
cpp/include/algorithms.hpp Show resolved Hide resolved
cpp/include/utilities/cython.hpp Show resolved Hide resolved
cpp/src/community/egonet.cu Outdated Show resolved Hide resolved
@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 95d4dec into rapidsai:branch-0.18 Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Ego graphs
4 participants