You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Louvain method community detection (migrated from Trac #239) #239
induced_graph and modularity functions are well tested.
best_partition and generate_dendogram are more difficult to test. Louvain algorithm is not deterministic and thus there is no "known value". Properties of the partitions or of the generated tree are also difficult to guarantee. I have written some tests to validate that partitions get more and more general and that the modularity increases, that grouped nodes are effectively grouped and some very obvious cases with clique
Ben Edwards is developing code for a GSoC project that can include this algorithm, see #557. We'll probably end up with a modified API to handle other community finding algorithms all in the same general style. Would you be willing to help us to get your code into NetworkX along with the other community finding algorithms?
I ran the latest version of your code against some sample real-world networks. If you compare the modularity against the numbers from the Newman (2006) publication they are very respectable. And I must say that the speed is impressive!
'''
Karate undirected network
N 34 M 78
Louvain Q 0.419
Jazz musicians undirected network
N 198 M 2742
Louvain Q 0.441
Metabolic undirected network
N 453 M 2040
Louvain Q 0.428
E-mail undirected network
N 1133 M 5452
Louvain Q 0.57
Key signing undirected network
N 10680 M 24316
Louvain Q 0.882
Physicists undirected network (version of 2003)
N 30460 M 120029
Louvain Q 0.759
'''
Activity
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @chebee7i, 2009-12-12
The linked code is LGPL. Do we know if the author would be open to the BSD license?
networkx-trac commentedon Jul 20, 2012
Comment in Trac by trac user taynaud, 2010-01-21
Replying to [comment:1 cellison]:
I am the author and i am open to the BSD license.
There is a new version using the new API (1.01) on my website.
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @hagberg, 2010-03-10
Still listed as LGPL so we can't include this unless it is licensed with
BSD compatible terms. Moving to networkx-future.
networkx-trac commentedon Jul 20, 2012
Attachment in Trac by trac user taynaud, 2010-03-15: community.py
networkx-trac commentedon Jul 20, 2012
Comment in Trac by trac user taynaud, 2010-03-15
The web site has been updated and is now claiming BSD. Code is attached due to server issue.
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @hagberg, 2010-09-06
Needs tests or examples.
networkx-trac commentedon Jul 20, 2012
Comment in Trac by trac user taynaud, 2011-05-02
Hello,
I have written some tests and improved the documentation (code and tests are stored at https://bitbucket.org/taynaud/python-louvain).
induced_graph and modularity functions are well tested.
best_partition and generate_dendogram are more difficult to test. Louvain algorithm is not deterministic and thus there is no "known value". Properties of the partitions or of the generated tree are also difficult to guarantee. I have written some tests to validate that partitions get more and more general and that the modularity increases, that grouped nodes are effectively grouped and some very obvious cases with clique
Considering examples, there are now some in the improved documentation
http://perso.crans.org/aynaud/communities/index.html
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @hagberg, 2011-05-21
Ben Edwards is developing code for a GSoC project that can include this algorithm, see #557. We'll probably end up with a modified API to handle other community finding algorithms all in the same general style. Would you be willing to help us to get your code into NetworkX along with the other community finding algorithms?
networkx-trac commentedon Jul 20, 2012
Comment in Trac by trac user taynaud, 2011-05-23
Yes, I would be glad to help you modifying and integrating the algorithm with other community detection algorithm in networkx.
networkx-trac commentedon Jul 20, 2012
Comment in Trac by @Midnighter, 2011-06-09
I ran the latest version of your code against some sample real-world networks. If you compare the modularity against the numbers from the Newman (2006) publication they are very respectable. And I must say that the speed is impressive!
'''
Karate undirected network
N 34 M 78
Louvain Q 0.419
Jazz musicians undirected network
N 198 M 2742
Louvain Q 0.441
Metabolic undirected network
N 453 M 2040
Louvain Q 0.428
E-mail undirected network
N 1133 M 5452
Louvain Q 0.57
Key signing undirected network
N 10680 M 24316
Louvain Q 0.882
Physicists undirected network (version of 2003)
N 30460 M 120029
Louvain Q 0.759
'''
[[Image(http://i47.photobucket.com/albums/f160/ernie999/modularity_table.png, 600px, nolink, center)]]
hagberg commentedon Nov 24, 2017
See #951