FindGraphCommunities

FindGraphCommunities[g]

finds communities in the graph g.

FindGraphCommunities[{vw,}]

uses rules vw to specify the graph g.

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 all

Basic Examples  (2)

Find communities in a graph:

Highlight the communities:

Visualize communities:

Scope  (7)

FindGraphCommunities works with undirected graphs:

Directed graphs:

Weighted graphs:

Multigraphs:

Mixed graphs:

Use rules to specify the graph:

FindGraphCommunities works with large graphs:

Options  (6)

Method  (6)

By default, FindGraphCommunities uses modularity maximization methods:

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

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

Use Method->"Spectral" for spectral partitioning:

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

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

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

Applications  (2)

Find communities in a friendship network between members of a karate club:

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

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

Partition teams in six divisions:

Properties & Relations  (5)

Communities are ordered by their length, with the largest community first:

By default, FindGraphCommunities gives communities with high modularity:

Use GraphAssortativity to compute the modularity:

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

The size of communities in the WattsStrogatz model:

In random spatial graphs:

CommunityGraphPlot finds and visualizes communities:

Specify communities:

Introduced in 2012
 (9.0)
 |
Updated in 2014
 (10.0)
2015
 (10.3)