Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-17-2021 12:31 AM
I want to execute graph algorithms from the GDS plugin. To do so, a graph projection needs to be defined: 4.1. Graph Catalog - Chapter 4. Graph management
However, I noticed that there is a huge difference in the degree distribution (max of 10k) when only using (A) (= only Friends) but the max is down to 5 when using all the relations present in (B).
This seems strange to me - I would have expected that the max degree can only increase when more diverse types of relationships are made available to the GDS graph.
CALL gds.graph.drop('my_graph') YIELD graphName;
// A: only Friend
CALL gds.graph.create.cypher(
'my_graph',
'MATCH (n) RETURN id(n) AS id',
'MATCH (a)-[r:Friend]->(b) RETURN id(a) AS source, id(b) AS target'
);
// B: everything
CALL gds.graph.create.cypher(
'my_graph',
'MATCH (n) RETURN id(n) AS id',
'MATCH (a)-[r]->(b) RETURN id(a) AS source, id(b) AS target'
);
CALL gds.graph.list();
02-18-2021 07:19 AM
You'll want to look at relationship aggregation parameters: https://neo4j.com/docs/graph-data-science/current/management-ops/cypher-projection/#cypher-projectio...
My suspicion is that, while the degree is higher, the number of nodes is lower for the Friend
projection. I assume you're using percentiles vs maximum?
02-19-2021 06:57 AM
I was looking at the output for: CALL gds.graph.list();
and there at the max degree attribute. This attribute decreased drastically when adding more relationships - and I still do not understand why.
All the sessions of the conference are now available online