Getting Error in Louvain community detection algorithm

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!

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/

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

Hello @mochalla :blush:

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