-
Notifications
You must be signed in to change notification settings - Fork 310
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
[FEA] Ego graphs #475
Comments
If you only need the vertices in the resultant subgraph, you can currently use SSSP's output and filter any distance ranges in cudf. That does only out-neighbours though. If you need in-neighbours as well, you would need the extra step of running SSSP on the transpose graph. If the graph is unweighted, you can replace SSSP with BFS. |
Great request. We will get this added to our schedule. Since I have a personal bias towards ego-based community detection, getting ego-graphs is something that is on the roadmap. |
Great to hear that others might be interested in this feature! I have something that works just via |
This would work, but (unless I'm mistaken) would perform a lot of unnecessary computation if it searches deeper than our ego goal. Could we add something like |
Added to release 0.11 for design dicussion |
Has there been any progress? I would also love to see this feature! In case it is helpful for someone else:
|
here is an example code.
|
### 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 Authors: - Alex Fender (@afender) - @Iroy30 Approvers: - @Iroy30 - Brad Rees (@BradReesWork) URL: #1365
Is your feature request related to a problem? Please describe.
It would be very helpful if
cugraph
could have the ability to calculate the ego graph to a provided radius, as is done innetworkx
via https://networkx.github.io/documentation/stable/reference/generated/networkx.generators.ego.ego_graph.html?highlight=ego_graph#networkx.generators.ego.ego_graph.Describe the solution you'd like
Given a graph, the user would provide a series of required and optional values, just like
networkx.generators.ego.ego_graph
. From there, the method returns a subgraph of neighbors, centered at the given node, within a given radius.Describe alternatives you've considered
This can be done in
networkx
but is rather slow, particularly if you want to do it for multiple target nodes. This would lend itself well to parallelization.Task List
Unknown.
Additional context
None
The text was updated successfully, but these errors were encountered: