Betweenness Centrality for weighted graph

Hello

Is there a way we can implement a betweenness centrality algorithm for a weighted graph.

Thanks.

Hi @him4318 the algorithm in GDS is for unweighted graphs, but you could run it, the only thing is the weight its not going to influence the results. maybe you could use Weighted Degree Centrality https://neo4j.com/docs/graph-data-science/current/algorithms/degree-centrality/#algorithms-degree-weighted-sample

Hi @roberto1
Can we implement user-defined centrality which can use the weights just like it is done in Networkx?

well in Neo4j you have two possible solutions for this, you could create procedures https://neo4j.com/blog/intro-user-defined-procedures-apoc/
or you could create a functions
https://neo4j.com/developer/cypher/procedures-functions/#_extending_cypher

Thanks @roberto1.
I will look into it.

1 Like

Hello
Did you find a solution?
Many thanks