cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Louvain specify resolution in GDS (as known from networkx)

In networkx community API — Community detection for NetworkX 2 documentation the resolution parameter allows specifying the size of the communities.
This parameter does not seem to be available in GDS. Am I overlooking it? If not, where/how is it called in GDS?

1 ACCEPTED SOLUTION

Looking at the source code for networkx (networkx.algorithms.community.louvain — NetworkX 2.7rc1.dev0 documentation) and the original paper they cite (Fast Unfolding of Communities in Large Networks) I'm not sure the resolution parameter is the same as specifying size of the communities; rather it appears to be a parameter than can be used to bias the algorithm to larger or smaller communities.

We don't currently offer a resolution parameter, although you can use includeIntermediateCommunities to retrieve higher resolution community membership (communities that were combined to get the final result). You can also modify the maxLevels parameter to control how many levels the graph is clustered into and then condensed.

View solution in original post

2 REPLIES 2

Looking at the source code for networkx (networkx.algorithms.community.louvain — NetworkX 2.7rc1.dev0 documentation) and the original paper they cite (Fast Unfolding of Communities in Large Networks) I'm not sure the resolution parameter is the same as specifying size of the communities; rather it appears to be a parameter than can be used to bias the algorithm to larger or smaller communities.

We don't currently offer a resolution parameter, although you can use includeIntermediateCommunities to retrieve higher resolution community membership (communities that were combined to get the final result). You can also modify the maxLevels parameter to control how many levels the graph is clustered into and then condensed.

Hello 

I tried maxLevels but nothing new happened. I mean the no. of clusters remains the same when I executed the algorithm without specifying the maxLevels parameter

 

//Community_Louvain
CALL gds.louvain.stream('myGraph',{maxLevels:3})
YIELD nodeId, communityId, intermediateCommunityIds
RETURN count(*) as size, communityId, intermediateCommunityIds
ORDER BY size ASC