When calculating the betweenness centrality of my graph, some nodes receive negative values when using 'Undirected' as relationship orientation. Happens in Neo4j 4.0.6 with gds 1.2.2. but also in older versions. The graph itself should be alright, exporting it to Gephi and then calculating the betweenness factor returns all positive values.
Here is the Query:
CALL gds.alpha.betweenness.stream({
nodeProjection: 'poi',
relationshipProjection: {
similar: {
type: 'similar',
orientation: 'UNDIRECTED'
}
}
})
YIELD nodeId, centrality
RETURN gds.util.asNode(nodeId).OsmID AS id, centrality
ORDER BY centrality ASC
Result: Negative Values after betweenness calculation
Used Graph: graphml file (4MB)
I am pretty much out of ideas at this point, the query should be alright and the graph also. Any help would be greatly appreciated.