FindGraphCommunities
✖
FindGraphCommunities
Details and Options

- FindGraphCommunities finds communities with many edges joining vertices of the same community and comparatively few edges joining vertices of different communities.
- FindGraphCommunities returns a list of communities {c1,c2,…}, where each community ci is a list of vertices.
- The communities are ordered by their length, with the largest community first.
- FindGraphCommunities supports a Method option that specifies the detailed method to use.
- Possible settings for the Method option include:
-
"Modularity" modularity-based clustering "Centrality" centrality-based clustering "CliquePercolation" clique percolation-based clustering "Hierarchical" hierarchical-based clustering "Spectral" spectral-based clustering - FindGraphCommunities works with undirected graphs, directed graphs, weighted graphs, multigraphs, and mixed graphs.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases

https://wolfram.com/xid/0tp745bytirzzu-1sby6


https://wolfram.com/xid/0tp745bytirzzu-sismj8


https://wolfram.com/xid/0tp745bytirzzu-emyblc


https://wolfram.com/xid/0tp745bytirzzu-k0xus1


https://wolfram.com/xid/0tp745bytirzzu-xznnu2

Scope (7)Survey of the scope of standard use cases
FindGraphCommunities works with undirected graphs:

https://wolfram.com/xid/0tp745bytirzzu-ez8fmf


https://wolfram.com/xid/0tp745bytirzzu-dpe04v


https://wolfram.com/xid/0tp745bytirzzu-uocid0


https://wolfram.com/xid/0tp745bytirzzu-15kl6n


https://wolfram.com/xid/0tp745bytirzzu-czvddh

Use rules to specify the graph:

https://wolfram.com/xid/0tp745bytirzzu-t96r7

FindGraphCommunities works with large graphs:

https://wolfram.com/xid/0tp745bytirzzu-cddhqp

https://wolfram.com/xid/0tp745bytirzzu-ozq2m5

Options (6)Common values & functionality for each option
Method (6)
By default, FindGraphCommunities uses modularity maximization methods:

https://wolfram.com/xid/0tp745bytirzzu-9cy3t

This can also be obtained with Method->"Modularity":

https://wolfram.com/xid/0tp745bytirzzu-jtdtac

Use Method->"Hierarchical" for hierarchical clustering based on vertex similarity:

https://wolfram.com/xid/0tp745bytirzzu-k5uwhz

Use Method->"Spectral" for spectral partitioning:

https://wolfram.com/xid/0tp745bytirzzu-3zhjc1

Use Method->"Centrality" for partitioning based on edge centrality:

https://wolfram.com/xid/0tp745bytirzzu-rm0kp5

Use Method->"CliquePercolation" for k-clique percolation:

https://wolfram.com/xid/0tp745bytirzzu-ujpr77

Use Method->"VertexMoving" to improve the result obtained by default:

https://wolfram.com/xid/0tp745bytirzzu-047kxu


https://wolfram.com/xid/0tp745bytirzzu-ns2gqf


https://wolfram.com/xid/0tp745bytirzzu-u2pwpj

Applications (2)Sample problems that can be solved with this function
Find communities in a friendship network between members of a karate club:

https://wolfram.com/xid/0tp745bytirzzu-uowy3o

https://wolfram.com/xid/0tp745bytirzzu-vdn3wc

Predict the split of the network in case of an internal conflict:

https://wolfram.com/xid/0tp745bytirzzu-deykiq

A weighted network of wins in the National Hockey League during regular season 2010–2011. Group teams by conferences:

https://wolfram.com/xid/0tp745bytirzzu-bdkpsm

https://wolfram.com/xid/0tp745bytirzzu-tphwdv

Partition teams in six divisions:

https://wolfram.com/xid/0tp745bytirzzu-c0enfy

Properties & Relations (5)Properties of the function, and connections to other functions
Communities are ordered by their length, with the largest community first:

https://wolfram.com/xid/0tp745bytirzzu-pmxx5l

https://wolfram.com/xid/0tp745bytirzzu-38jxwz

By default, FindGraphCommunities gives communities with high modularity:

https://wolfram.com/xid/0tp745bytirzzu-ne1mi7

https://wolfram.com/xid/0tp745bytirzzu-e43ji3

Use GraphAssortativity to compute the modularity:

https://wolfram.com/xid/0tp745bytirzzu-g0rf8d

Use FindGraphPartition to find partitions of vertices into k parts of approximately equal size:

https://wolfram.com/xid/0tp745bytirzzu-pombu9

https://wolfram.com/xid/0tp745bytirzzu-bpem8

The size of communities in the Watts–Strogatz model:

https://wolfram.com/xid/0tp745bytirzzu-xarxvx

https://wolfram.com/xid/0tp745bytirzzu-0edlcv


https://wolfram.com/xid/0tp745bytirzzu-0nxaa0

https://wolfram.com/xid/0tp745bytirzzu-f9stea

CommunityGraphPlot finds and visualizes communities:

https://wolfram.com/xid/0tp745bytirzzu-irifvs

https://wolfram.com/xid/0tp745bytirzzu-yl96db


https://wolfram.com/xid/0tp745bytirzzu-7f2wir

Wolfram Research (2012), FindGraphCommunities, Wolfram Language function, https://reference.wolfram.com/language/ref/FindGraphCommunities.html (updated 2015).
Text
Wolfram Research (2012), FindGraphCommunities, Wolfram Language function, https://reference.wolfram.com/language/ref/FindGraphCommunities.html (updated 2015).
Wolfram Research (2012), FindGraphCommunities, Wolfram Language function, https://reference.wolfram.com/language/ref/FindGraphCommunities.html (updated 2015).
CMS
Wolfram Language. 2012. "FindGraphCommunities." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/FindGraphCommunities.html.
Wolfram Language. 2012. "FindGraphCommunities." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/FindGraphCommunities.html.
APA
Wolfram Language. (2012). FindGraphCommunities. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindGraphCommunities.html
Wolfram Language. (2012). FindGraphCommunities. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindGraphCommunities.html
BibTeX
@misc{reference.wolfram_2025_findgraphcommunities, author="Wolfram Research", title="{FindGraphCommunities}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FindGraphCommunities.html}", note=[Accessed: 15-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_findgraphcommunities, organization={Wolfram Research}, title={FindGraphCommunities}, year={2015}, url={https://reference.wolfram.com/language/ref/FindGraphCommunities.html}, note=[Accessed: 15-April-2025
]}