Closed LyneEwandje closed 1 year ago
Hello @LyneEwandje,
the problem lies in specifying the REVERSE
orientation twice in the cypher queries.
What happens is, that first during graph projection the relationships are reversed.
Then when you call degree centrality with REVERSE
orientation, you are reversing the projected relationships.
This results in computing the degree centrality of the reversed REVERSE
relationships or in short the NATURAL
orientation.
I would suggest to remove your orientation from the degree
query if you have more algorithms you want to run your graph.
Hello @FlorentinD,
Thanks for your quick answer!! Indeed I did the tests by removing the orientation of the degree request and by leaving only the definition of the projection graph and it works. Thanks !
Environnement -Neo4j Desktop 4.4.5 -Neuler-graph data Science 0.1.54 -GDSL 2.0.3
Reproduction steps
1) insert graph CREATE (alice:User {name: 'Alice'}), (bridget:User {name: 'Bridget'}), (charles:User {name: 'Charles'}), (doug:User {name: 'Doug'}), (mark:User {name: 'Mark'}), (michael:User {name: 'Michael'}),
(alice)-[:FOLLOWS {score: 1}]->(doug), (alice)-[:FOLLOWS {score: -2}]->(bridget), (alice)-[:FOLLOWS {score: 5}]->(charles), (mark)-[:FOLLOWS {score: 1.5}]->(doug), (mark)-[:FOLLOWS {score: 4.5}]->(michael), (bridget)-[:FOLLOWS {score: 1.5}]->(doug), (charles)-[:FOLLOWS {score: 2}]->(doug), (michael)-[:FOLLOWS {score: 1.5}]->(doug)
CALL gds.graph.project( 'myGraph', 'User', { FOLLOWS: { orientation: 'REVERSE', properties: ['score'] } } )
3. visualise the results With the orientation Reverse in Ne04j
Comparison of results With the reverse and natural orientation in Neuler and Ne04J
which gives us opposite results of the execution of the centrality degree algorithm in Ne04j and in Neuler