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:

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).

CMS

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

BibTeX

@misc{reference.wolfram_2024_findgraphcommunities, author="Wolfram Research", title="{FindGraphCommunities}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FindGraphCommunities.html}", note=[Accessed: 05-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_findgraphcommunities, organization={Wolfram Research}, title={FindGraphCommunities}, year={2015}, url={https://reference.wolfram.com/language/ref/FindGraphCommunities.html}, note=[Accessed: 05-December-2024 ]}