GraphAssortativity

GraphAssortativity[g]
gives the assortativity coefficient of a graph g using vertex degrees.

GraphAssortativity[g,"prop"]
gives the assortativity coefficient of the graph g using vertex property .

GraphAssortativity[g,{{vi 1,vi 2,},}]
gives the assortativity coefficient of the graph g with respect to the vertex partition .

GraphAssortativity[g,{v1,v2,}{x1,x2,}]
gives the assortativity coefficient of the graph g using data for vertices .

Details and OptionsDetails and Options

  • For a graph with edges and adjacency matrix entries , the assortativity coefficient is given by , where is the out-degree for the vertex and is 1 if there is an edge from to and 0 otherwise.
  • For quantitative data where are used, is taken to be .
  • For categorical data where are used, is taken to be 1 if and are equal and 0 otherwise.
  • In GraphAssortativity[g], is taken to be the vertex out-degree for the vertex .
  • In GraphAssortativity[g,"prop"], is taken to be PropertyValue[{g,vi},"prop"] for the vertex .
  • In GraphAssortativity[g,{{vi 1,vi 2,},}], vertices in a subset have the same categorical data .
  • GraphAssortativity[g,Automatic->{x1,x2,}] takes the vertex list to be VertexList[g].
  • The option "DataType"->type can be used to specify the type for the data . Possible settings are and .
  • The option "Normalized"->False can be used to compute the assortativity modularity.
  • For a graph with edges and adjacency matrix entries , the assortativity modularity is given by , where is the out-degree for the vertex .
  • GraphAssortativity works with undirected graphs, directed graphs, weighted graphs, multigraphs, and mixed graphs.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Compute the assortativity coefficient of the Zachary karate club network:

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

Distribution of the assortativity coefficient of uniform random graphs:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2012
(9.0)
| Updated in 2014
(10.0)