Closed jmmcd closed 7 years ago
In general, modularity optimization with Louvain method on Karate Club Graph gives 4 communities. Having 2 communities give a lower modularity than 4, and thus maximizing modularity here will not work.
With Louvain Method, you cannot really specify the number of communities you want. You may try to play with the resolution
parameters but it is more suited to get more communities than less.
dendrogram
is a tree, and in your case I think its depth is 2, so you have an IndexError
when you start to get level 2.
Thanks. Yes, I misunderstood the dendrogram -- I thought it was like the tree used in hierarchical clustering, which allows to choose the number of clusters by ascending.
That is good to hear that it is an expected result for Louvain with the Karate Club.
I tried the resolution parameter, and as you said it didn't solve the problem.
On 8 March 2017 at 09:29, Thomas Aynaud notifications@github.com wrote:
In general, modularity optimization with Louvain method on Karate Club Graph gives 4 communities. Having 2 communities give a lower modularity than 4, and thus maximizing modularity here will not work.
With Louvain Method, you cannot really specify the number of communities you want. You may try to play with the resolution parameters but it is more suited to get more communities than less.
dendrogram is a tree, and in your case I think its depth is 2, so you have an IndexError when you start to get level 2.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taynaud/python-louvain/issues/5#issuecomment-284991581, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKQBnZ-qJ4WlJrb8Z_NXx_xBfiSiynCks5rjnUOgaJpZM4MWdwC .
-- Dr. James McDermott Lecturer in Business Analytics Programme Director, MSc in Business Analytics D209 UCD Michael Smurfit Graduate Business School College of Business, University College Dublin, Ireland. Phone +353 1 716 8031 http://jmmcd.net http://www.ucd.ie/cba/members/jamesmcdermott/
Thanks. Yes, I misunderstood the dendrogram -- I thought it was like the tree used in hierarchical clustering, which allows to choose the number of clusters by ascending. That is good to hear that it is an expected result for Louvain with the Karate Club. I tried the resolution parameter, and as you said it didn't solve the problem. …
In my case, I tried the resolution parameter as 6 or 7 then it could be changed the number of clusters(partitions).
I'm trying to find the two communities in the Karate Club graph. I think I should be able to use
partition_at_level
but I must be missing something!