CommunityModularity


gives the community modularity of a partition.


gives the community modularity of an assignment.

DetailsDetails

  • To use , you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
  • A community in a network is a group of vertices such that there is a higher density of edges within the group than between them.
  • Given a graph , let the vertex set be partitioned into subsets such that each subset belongs to one community. The community modularity of this partition is defined as , where is the percentage of edges that have both ends in community , and is the percentage of edges that start from community . In other words, and .
  • The community modularity is a number less than or equal to 1. A large positive value indicates that the vertex partition gives significant community structure.
  • 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
In[3]:=
Click for copyable input
Out[3]=

This gives the community modularity, assuming a partition :

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

This gives the community modularity, assuming a partition :

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