<blockquote>
<p>I have tried python-louvain for partitioning but that gives inaccurate results[...]</p>
</blockquote>
<p>The Louvain method is not perfect and there are no perfect methods, they always depend on what you are trying to achieve (see conclusion of <a href="https://hal.archives-ouvertes.fr/hal-01976587/document" rel="nofollow noreferrer">this paper</a>).</p>
<blockquote>
<p>[...] like it partitioned two users into different groups even when their messaging frequency was pretty high.</p>
</blockquote>
<p>It seems that this user may belong to more than a single community... Maybe try a partitioning method that allows overlapping communities, such as <a href="https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.community.kclique.k_clique_communities.html#networkx.algorithms.community.kclique.k_clique_communities" rel="nofollow noreferrer">K-Clique</a>. This kind of partitioning methods allow nodes to belong to more than a single community.</p>
<h3>Algorithms:</h3>
<p>Here are some alternative algorithms that I’ve found:</p>
<ol>
<li><p>There are a number of algorithms already included in the networkX package(<a href="https://networkx.org/documentation/stable/reference/algorithms/community.html" rel="nofollow noreferrer">here</a>). I would suggest <code>girvan_newman</code>but it takes a lot of computation power...</p>
</li>
<li><p>The CDLib package also has a number of algorithms for networkX(<a href="https://cdlib.readthedocs.io/en/latest/reference/cd_algorithms/node_clustering.html" rel="nofollow noreferrer">here</a>), including some that allow for overlapping communities. Also, check the <a href="https://cdlib.readthedocs.io/en/latest/reference/cd_algorithms/algs/cdlib.algorithms.leiden.html#cdlib.algorithms.leiden" rel="nofollow noreferrer">leiden algorithm</a>, you may prefer it to louvain, it's supposed to be better(according to their <a href="https://arxiv.org/pdf/1810.08473.pdf" rel="nofollow noreferrer">paper</a>)</p>
</li>
<li><p>I would still recommend using <a href="https://python-louvain.readthedocs.io/en/latest/api.html" rel="nofollow noreferrer">python-louvain</a>, for crisp communities</p>
</li>
</ol>
<p>Good luck!</p>
Graph Clustering based on the edge weights
<p>I have built a graph using networkx which is a social network with people as nodes and the messaging frequencies as the edge weights. I want to cluster this network into different groups of people. The ones who message each other a lot tend to be in the same group. How do I go about this? Which clustering algorithm should I use? Also, how do I visualize the grouping like a dendrogram tree?</p>
<p>Thanks in advance! :D
P.S.: I have tried python-louvain for partitioning but that gives inaccurate results like it partitioned two users into different groups even when their messaging frequency was pretty high</p>