- neo4j 5.5, gds 2.4.5
I have a GDS project with several nodes, and I get both node embedding and centrality results on this project by doing:
call gds.beta.graphSage.train(
'Project101',
{
modelName:'Model101',
featureProperties: ['label'],
aggregator: 'mean',
activationFunction: 'sigmoid',
randomSeed: 1337,
sampleSizes: [3, 3]
}
)
CALL gds.beta.graphSage.stream(
'Project101',
{
modelName: 'Model101'
}
)
YIELD nodeId, embedding
which gave me the embedding for each node,
nodeId | score
101 | 0.95
102 | 0.90
and:
CALL gds.eigenvector.stream(
'Project101'
)
YIELD nodeId, score
which gave me the centrality score for each node
nodeId | embedding
101 | [0.02, 0.015, 0.01 ...]
102 | [0.03, 0.013, 0.04 ...]
Now I am trying to output a dataframe like
nodeId | score | embedding
101 | 0.95 | [0.02, 0.015, 0.01 ...]
102 | 0.90 | [0.03, 0.013, 0.04 ...]
by combining both outputs above together. How should I deal with my Cypher?
P.S. Please do not use write mode and try only complete it on neo4j without any other coding platform.