neo4j-contrib / neo4j-graph-algorithms

Efficient Graph Algorithms for Neo4j
https://github.com/neo4j/graph-data-science/
GNU General Public License v3.0
770 stars 195 forks source link

Algorithm: Betweenness Centrality #98

Open mknblch opened 7 years ago

mknblch commented 7 years ago

Betweenness Centrality is a measure of centrality in a graph based on shortest paths. For every pair of vertices in a connected graph, there exists at least one shortest path between the vertices such that either the number of edges that the path passes through or the sum of the weights of the edges is minimized. The betweenness centrality for each vertex is the number of these shortest paths that pass through the vertex.

Progress

TODO

mknblch commented 7 years ago

We have 3 different implementations so far

all of them calculate the (unweighted) node-betweenness based on the number of nodes (not their weight)

TODO

mknblch commented 7 years ago

@tomasonjo Do we already have documentation?

tomasonjo commented 7 years ago

I see only two version:

=== algo.betweenness

=== algo.betweenness.exp1

On Fri, Jul 21, 2017 at 8:36 PM, Martin Knobloch notifications@github.com wrote:

@tomasonjo https://github.com/tomasonjo Do we already have documentation?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neo4j-contrib/neo4j-graph-algorithms/issues/98#issuecomment-317079657, or mute the thread https://github.com/notifications/unsubscribe-auth/ATBjTUz5Y42PuNrNSHiu-901S2wObtB1ks5sQO-WgaJpZM4NIy_a .

JoKre17 commented 5 years ago

Is there the intention to make a weighted version of the betweenness centrality?

I guess I didn't really thought this through, but wouldn't it be possible e.g. for the normal BetweennessCentrality.java to replace the distances array with a float/double distances array and iterate over the relationships via the WeightedRelationshipIterator?

In most of the cases there won't be any or really small sigma values, I am not sure, wether this would be an issue, but I guess not.