CommunityStructureAssignment

CommunityStructureAssignment[g]
gives the assignment of vertices of a graph g into communities.

DetailsDetails

  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • The assignment groups the vertices into communities, such that there is a higher density of edges within communities than between them.
  • The following option can be given:
  • WeightedFalsewhether edges with higher weights are preferred during matching

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

This defines a small graph:

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

This finds that the network is grouped into two communities:

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

This shows which vertex is in which community:

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

This plots the graph, coloring the vertices based on community assignment:

In[5]:=
Click for copyable input
Out[5]=
New to Mathematica? Find your learning path »
Have a question? Ask support »