Skip to content

Generalizing Closeness centrality to weighted networks #1384

@FedericoBruzzone

Description

@FedericoBruzzone

Newman (2001)1 has generalized the Closeness centrality to weighted networks by using Dijkstra’s algorithm (Shortest Paths in Weighted Networks).
Newman's algorithm focuses solely on the sum of tie weights, neglecting the number of ties along a path. Opsahl et al. (2010)2 address this limitation by proposing a generalized shortest-path measure that accounts for both tie strength and the number of ties, providing a more comprehensive approach to path length determination.

What is the expected enhancement?

To incorporate this improved centrality measure, I am willing to update the code in rustwork-core, as it is relevant to a Rust project I am currently developing for research. This enhancement involves modifying the closeness_centrality function to accept a new parameter, which would be pass to the dijkstra function (inside of closeness_centrality):

weight_fn: F where F: FnMut(G::EdgeRef) -> Result<f64, E>

This approach is similar to how katz_centrality and eigenvector_centrality handle weight functions, allowing for more flexible and precise path length calculations. If we want to implement Opsahl's proposal, more work would be required.

If it was not clear, this is a request that I would take it upon myself to implement. I would like to get feedback before proceeding, what do you think?


P.S.: This argument can also be made with betweeness centrality, but right now I would only be able to implement it for closeness (for time reasons). This would become a new issue for future developments. Maybe soon I could take this on as well.

Footnotes

  1. https://journals.aps.org/pre/abstract/10.1103/PhysRevE.64.016132

  2. https://www.sciencedirect.com/science/article/pii/S0378873310000183?casa_token=aPpeBKNNbP4AAAAA:vRgWc-3IbznHjpd2SCm9OL4x2mVKNmJjLi3_4gKfwWr_KGue1LEt5NhZURDeucoyxrcuNFvL

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions