Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-25-2023 03:39 AM
My Query
CALL gds.louvain.stream({
nodeProjection: 'Provider',
relationshipProjection: {
REFERRED: {
type: 'REFERRED',
orientation: 'UNDIRECTED'
},
HEALTHCARE_PROVIDED_BY: {
type: 'HEALTHCARE_PROVIDED_BY',
orientation: 'UNDIRECTED'
}
},
graph:'cypher',
direction: 'UNDIRECTED',
concurrency: 4
})
YIELD nodeId, communityId
RETURN gds.util.asNode(nodeId).name AS Provider, communityId
ORDER BY communityId
Error I am getting:
Can anyone comment to solve this!
01-25-2023 03:54 AM
that is the incorrect syntax for that procedure. It is expecting a string for the first parameter that specifies the projected graph to execute the algorithm against.
You need to create a map projection first.
https://neo4j.com/docs/graph-data-science/current/management-ops/projections/graph-project/
then call the procedure https://neo4j.com/docs/graph-data-science/current/algorithms/louvain/
01-27-2023 12:35 AM
Thank you @glilienfield .
I tried projecting with native graph. And then using louvian, but my question now is , how to set seedproperty and relationshipweightproperty?
After that, In this query, I see they used seedproperty.
CALL gds.louvain.stream('myGraph', { seedProperty: 'seed' })
YIELD nodeId, communityId, intermediateCommunityIds
RETURN gds.util.asNode(nodeId).name AS name, communityId, intermediateCommunityIds
ORDER BY name ASC
and here relationshipWeightProperty
CALL gds.louvain.stream('myGraph', { relationshipWeightProperty: 'weight' })
YIELD nodeId, communityId, intermediateCommunityIds
RETURN gds.util.asNode(nodeId).name AS name, communityId, intermediateCommunityIds
ORDER BY name ASC
01-27-2023 07:39 AM
Hello @mochalla 😊
CALL gds.louvain.stream(
'myGraph',
{
relationshipWeightProperty: 'weight',
seedProperty: 'seed'
})
YIELD
nodeId,
communityId,
intermediateCommunityIds
RETURN
gds.util.asNode(nodeId).name AS name,
communityId, intermediateCommunityIds
ORDER BY name ASC
Regards,
Cobra
All the sessions of the conference are now available online