Skip to content

Update Betweenness Centrality to use weights #5154

@ChuckHastings

Description

@ChuckHastings

From below issue...

The original issue was against the legacy implementation which we decided we were not going to update. Now that we have a new implementation using graph primitives, we should add support for this. Note that support for this is already baked into the C and C++ API, but the optional edge weights parameter is never referenced.

To support weights, we would need to create a variant of Betweenness Centrality that uses SSSP logic instead of BFS logic. So it's likely just a matter of implementing a function brandes_sssp to go with brandes_bfs and selecting the proper version based on whether the edge weights are specified or not.

Hello, I would like to reopen this issue, as the nx_cugraph documentation implies that weight is a parameter that intends to be supported.

Image

https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.centrality.edge_betweenness_centrality.html#networkx.algorithms.centrality.edge_betweenness_centrality

I would like to reassess the possibility and intention to support weights on betweenness centrality. If it is intended, we should reopen this issue, and if possible point me in the right direction this should be implemented (I don't mind contributing, just point me at the file/directory where this should be implemented)

If we still do not intend to support weights, a pull request should be made to networkx to change documentation from "not yet supported" to "not supported"

Originally posted by @OrionSehn in #2319

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions