Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-06-2020 12:19 PM
Hello,
I have a co-authorship network on alias nodes
My attempt to find betweenness scores for the nodes returned 0 for all nodes.
CALL algo.betweenness.stream('alias','co_authors',{direction:'BOTH'})
YIELD nodeId, centrality
WITH algo.asNode(nodeId) AS node, centrality
SET node.betweenness_coauthors = centrality
When I attempted to use graph projections, I get a null pointer exception:
CALL algo.betweenness.stream('MATCH (n:alias) RETURN id(n) AS id',
'MATCH (n)-[:co_authors]-(m:alias) RETURN id(n) AS source, id(m) AS target',{graph:'cypher', direction:'BOTH'})
YIELD nodeId, centrality
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure algo.betweenness.stream
: Caused by: java.lang.NullPointerException
What went wrong?
02-07-2020 01:24 PM
There's no need to use set
-- just use the write mode of betweenness:
CALL algo.betweenness('alias','co_authors',{direction:'BOTH', write:true, writeProperty:'betweenness_coauthors'})
Please check out our documentation page for betweenness centrality; we have lots of examples that you can work off of: https://neo4j.com/docs/graph-algorithms/current/labs-algorithms/betweenness-centrality/
02-10-2020 08:02 AM
Hi @alicia.frame,
Kindly refer to my post - I did attempt computing betweenness centrality using
CALL algo.betweenness.stream('alias','co_authors',{direction:'BOTH'})
YIELD nodeId, centrality
RETURN max(centrality)
resulted an answer of 0 (please see attached screenshot) - I find it hard to believe given that the graph has some edges and therefore not all nodes are isolated (please see attached screenshot). How do I troubleshoot this?
Thanks a lot.
All the sessions of the conference are now available online