Skip to content

Commit

Permalink
changed gds.betweenness.stream yield from centrality to score
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusuf Baktir committed Aug 27, 2020
1 parent e4f6f71 commit 4411383
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nxneo4j/centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 32,15 @@ def betweenness_centrality(G, k=None, normalized=True, weight=None, endpoints=Fa
}
}
})
YIELD nodeId, centrality
RETURN gds.util.asNode(nodeId).%s AS node, centrality
YIELD nodeId, score
RETURN gds.util.asNode(nodeId).%s AS node, score
ORDER BY node ASC
""" % G.identifier_property

params = G.base_params()

with G.driver.session() as session:
result = {row["node"]: row["centrality"] for row in session.run(query, params)}
result = {row["node"]: row["score"] for row in session.run(query, params)}
return result


Expand Down

0 comments on commit 4411383

Please sign in to comment.