擅长:python、mysql、java
<p>我也是networkx和igraph的新手,我使用了Gephi,一个数据可视化工具/软件。它和你现在使用的networkx中的社区检测算法一样。具体来说,在<a href="http://perso.crans.org/aynaud/communities/" rel="nofollow">http://perso.crans.org/aynaud/communities/</a></p>
<blockquote>
<p>It uses the louvain method described in Fast unfolding of communities in large networks, Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, Renaud Lefebvre, Journal of Statistical Mechanics: Theory and Experiment 2008(10), P10008 (12pp)</p>
</blockquote>
<p>你无法获得理想数量的社区,我知道,有两种方法值得尝试:</p>
<ul>
<li>使用Gephi。您可以使用gephi,并且有一个名为<code>resolution</code>的参数可以更改您获得的社区的大小。</li>
<li>使用NetworkX。这次,我们可能不再使用<code>best_partition(G)</code>。但是使用<code>partition_at_level(dendrogram, level)</code>,我想这可能会有帮助。</li>
</ul>
<p>查看这里的<a href="https://bitbucket.org/taynaud/python-louvain/src/147f0973771485ce1b45c89c1e2766f94efaa4d4/community/__init__.py?at=default" rel="nofollow">source code</a>了解更多信息。</p>