This repository was archived by the owner on Apr 22, 2020. It is now read-only.
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
direction in louvain community detection #935
Copy link
Copy link
Open
Description
when i tried louvain in neo4j-graph-algorithms-3.5.14.0-standalone. i met the error.
"Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure `algo.beta.louvain.stream`: Caused by: java.lang.IllegalArgumentException: Incompatible directions between loaded graph and requested compute direction. Load direction: 'OUTGOING' Compute direction: 'BOTH' "
codes are here
MERGE (nAlice:User {id:'Alice'}) SET nAlice.community = 0
MERGE (nBridget:User {id:'Bridget'}) SET nBridget.community = 0
MERGE (nCharles:User {id:'Charles'}) SET nCharles.community = 1
MERGE (nDoug:User {id:'Doug'}) SET nDoug.community = 1
MERGE (nMark:User {id:'Mark'}) SET nMark.community = 1
MERGE (nMichael:User {id:'Michael'}) SET nMichael.community = 0
MERGE (nKarin:User {id:'Karin'}) SET nKarin.community = 1
MERGE (nAmy:User {id:'Amy'})
MERGE (nAlice)-[:FRIEND]->(nBridget)
MERGE (nAlice)-[:FRIEND]->(nCharles)
MERGE (nMark)-[:FRIEND]->(nDoug)
MERGE (nBridget)-[:FRIEND]->(nMichael)
MERGE (nCharles)-[:FRIEND]->(nMark)
MERGE (nAlice)-[:FRIEND]->(nMichael)
MERGE (nCharles)-[:FRIEND]->(nDoug)
MERGE (nMark)-[:FRIEND]->(nKarin)
MERGE (nKarin)-[:FRIEND]->(nAmy)
MERGE (nAmy)-[:FRIEND]->(nDoug)
CALL algo.louvain(
'MATCH (p:User) RETURN id(p) as id',
'MATCH (p1:User)-[f:FRIEND]-(p2:User)
RETURN id(p1) as source, id(p2) as target, f.weight as weight',
{graph:'cypher',write:true})
Metadata
Metadata
Assignees
Labels
No labels