FindGraphCommunities

FindGraphCommunities[g]
finds communities in the graph g.

FindGraphCommunities[{vw,}]
uses rules to specify the graph g.

Details and OptionsDetails 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 , where each community 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.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Find communities in a graph:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Highlight the communities:

In[3]:=
Click for copyable input
Out[3]=

Visualize communities:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2012
(9.0)
| Updated in 2015
(10.3)
Translate this page: