[Louvain Clustering] Different resolutions leading to same number of clusters but different labels #537
-
Hi! I have been using Louvain Clustering and noticed that a different resolutions, I may get the same number of clusters, but different cluster labels. In the example below (which I got after clustering)… The keys of this dictionary RES_DICT are resolution values. If there are two clusters, my cluster labels can either be 0 or 1. Taking 2 clusters as an example [0, 0, 0, 1, 1, 1], if 0 is the true cluster label, the cutoff index is the index at which the cluster label is no longer 0 (and is now 1). Thus, in this case, the cutoff index is 3 (0-indexed). The cutoff index is also the size of the first cluster. If I have 3 clusters [0, 0, 1, 2, 2, 2] and 0 is the true cluster label, the cutoff index is 2. Thus, as you can observe in this dictionary, for different resolutions, I can have the same number of clusters but different cutoffs, which implies that labels/membership of points is different. e.g. With resolutions 0.4, 0.5, 0.8, 0.9, I get 2 clusters from all, but the cutoff indices are 282, 269, 236, and 225 respectively! Why is this the case? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for your feedback. |
Beta Was this translation helpful? Give feedback.
Thanks for your feedback.
This is the case because the objective function that Louvain maximizes is different. Increasing the resolution puts more weight on the "diversity term" (second term of modularity), meaning that you either increase the number of clusters or make them more balanced.