I want to use GDS to project my graph such that all nodes in the base graph with the same value for a specific property get projected to the same representative node in the GDS graph and all relationships on the underlying nodes are projected to connect to the representative. e.g. if I start with,
The projected graph should have three nodes, one representing {a,c}, one representing {b}, and one representing {d} with edges {a,c} -> {b} and {a,c} -> {d}.
Hello Liz,
aggregating your graph this way is not currently possible with GDS.
Do you want to use GDS only for the aggregation or is the idea to project a graph into GDS of that shape and then run algorithms on top?
One option could be to create the super graph, such as with:
MATCH (n)
MERGE (n1:SUPER {name: n.name})
WITH n, n1
MATCH (n)-[r]->(m), (n1)
MERGE (m1:SUPER {name: m.name})
CREATE (n1)-[r1:R]->(m1)
And then you can project this graph into GDS with: CALL gds.graph.projection('g', 'SUPER', 'R')
To my knowledge yes. Inside GDS we dont offer such as an aggregation of a graph.
As a side note, some community detection algorithms create such graphs internally.
I can add it as a feature request but that wont help you in the near term.