These functions measure topological features that are intrinsic to a network, in the sense that they require nothing of the user beyond the network itself:

  • net_by_richclub() measures the rich-club coefficient of a network.

  • net_by_smallworld() measures the small-world coefficient for one- or two-mode networks. Small-world networks can be highly clustered and yet have short path lengths.

  • net_by_scalefree() measures the exponent of a fitted power-law distribution. An exponent between 2 and 3 usually indicates a power-law distribution.

  • net_by_balance() measures the structural balance index on the proportion of balanced triangles, ranging between 0 if all triangles are imbalanced and 1 if all triangles are balanced.

  • net_by_bipartivity() measures how close a network is to being bipartite, that is, to dividing into two sets with ties only between them.

  • net_by_meshedness() measures how many cycles a network has, relative to the most that a planar network of its size could have. A tree scores 0, and a network of triangles drawn on a plane scores 1.

net_by_richclub(.data)

net_by_smallworld(
  .data,
  variant = c("omega", "sigma", "SWI"),
  times = 100,
  method = NULL
)

net_by_scalefree(.data)

net_by_bipartivity(.data)

net_by_meshedness(.data)

net_by_balance(.data)

Source

{signnet} by David Schoch

Arguments

.data

A network object of class stocnet, igraph, tbl_graph, network, or similar. Internally any of these will be coerced to an efficient implementation. For more information on possible coercions, see e.g. manynet::as_stocnet().

variant

Character string naming which variant of the measure to compute, where more than one definition of the same quantity is in use. The variant chosen is reported when the result is printed.

times

Integer of number of simulations.

method

Deprecated. The former spelling of variant. Still accepted, but warns; please use variant instead.

Value

A network_measure numeric score.

The object also carries the measure it computed, the range its values can fall within, and whether and how those values were normalized. These are shown as a one-line header when the object is printed. Where a measure offers a choice between several ways of counting the same thing, it also carries the variant it used. All can be retrieved with attr().

Small-world variants

For net_by_smallworld() there are three small-world measures implemented:

  • "sigma" is the original equation from Watts and Strogatz (1998), $$\frac{\frac{C}{C_r}}{\frac{L}{L_r}}$$, where \(C\) and \(L\) are the observed clustering coefficient and path length, respectively, and \(C_r\) and \(L_r\) are the averages obtained from random networks of the same dimensions and density. A \(\sigma > 1\) is considered to be small-world, but this measure is highly sensitive to network size.

  • "omega" (the default) is an update from Telesford et al. (2011), $$\frac{L_r}{L} - \frac{C}{C_l}$$, where \(C_l\) is the clustering coefficient for a ring lattice with the same number of nodes and about the same number of ties. \(\omega\) ranges between -1 and 1, where values close to 0 are as close to a small-world as possible; negative values indicate a lattice-like network, and positive values a more random one.

  • "SWI" is an alternative proposed by Neal (2017), $$\frac{L - L_l}{L_r - L_l} \times \frac{C - C_r}{C_l - C_r}$$, where \(L_l\) is the average path length for the same ring lattice. \(SWI\) ranges between 0 and 1, where 1 is as close to a small-world as possible, though there may not be a network for which \(SWI = 1\).

Bipartivity

A network is bipartite when its nodes divide into two sets with ties only running between them and never within, which is exactly the condition that it contains no closed walk of odd length. Bipartivity therefore measures how close a network comes to that condition, as the share of its closed walks that are of even length: $$b(G) = \frac{\sum_i C_{even}(i)}{\sum_i C_{all}(i)}$$ A genuinely two-mode network scores exactly 1, and the more odd-length structure a network carries — triangles above all — the further it falls below 1. Note that this asks whether a network could be split in two, not whether it has been: it is defined on a one-mode network, whereas manynet::is_twomode() reports whether nodes are already partitioned into two modes. The node-level counterpart is node_by_subgraph() with walks = "odd" or "even".

Meshedness

Meshedness, or Kansky's alpha index, counts a network's independent cycles (its circuit rank) relative to the most that a planar network, one that can be drawn on a plane without crossing ties, of the same number of nodes can have: $$\alpha = \frac{m - n + c}{2n - 5}$$ where \(m\) is the number of ties, \(n\) the number of nodes, and \(c\) the number of components. It is read on the undirected, simple network, so that direction, loops, and parallel ties are not counted. It distinguishes, for example, tree-like road networks from grids. For a planar network it ranges from 0 to 1, but a network that is not planar can score above 1, so the upper end of its range is declared open. It is not defined for fewer than three nodes, where it returns NA.

References

On the rich-club coefficient

Zhou, Shi, and Raul J. Mondragon. 2004. "The Rich-Club Phenomenon in the Internet Topology". IEEE Communications Letters, 8(3): 180-182. doi:10.1109/lcomm.2004.823426

On small-worldliness

Watts, Duncan J., and Steven H. Strogatz. 1998. “Collective Dynamics of ‘Small-World’ Networks”. Nature 393(6684):440–42. doi:10.1038/30918

Telesford QK, Joyce KE, Hayasaka S, Burdette JH, Laurienti PJ. 2011. "The ubiquity of small-world networks". Brain Connectivity 1(5): 367–75. doi:10.1089/brain.2011.0038

Neal, Zachary P. 2017. "How small is it? Comparing indices of small worldliness". Network Science. 5 (1): 30–44. doi:10.1017/nws.2017.5

On scale-free networks

Barabasi, Albert-Laszlo, and Reka Albert. 1999. "Emergence of scaling in random networks", Science, 286(5439): 509-512. doi:10.1126/science.286.5439.509

Clauset, Aaron, Cosma Rohilla Shalizi, and Mark E.J. Newman. 2009. "Power-law distributions in empirical data", SIAM Review, 51(4): 661-703. doi:10.1137/070710111

Stumpf, Michael P.H., and Mason Porter. 2012. "Critical truths about power laws", Science, 335(6069): 665-666. doi:10.1126/science.1216142

Holme, Petter. 2019. "Rare and everywhere: Perspectives on scale-free networks", Nature Communications, 10(1): 1016. doi:10.1038/s41467-019-09038-8

On bipartivity

Estrada, Ernesto, and Juan A. Rodríguez-Velázquez. 2005. "Spectral measures of bipartivity in complex networks". Physical Review E 72(4): 046105. doi:10.1103/PhysRevE.72.046105

On meshedness

Kansky, Karel J. 1963. Structure of Transportation Networks. Chicago: University of Chicago, Department of Geography.

Buhl, Jerome, Jacques Gautrais, Ricard V. Solé, Pascale Kuntz, Sergi Valverde, Jean-Louis Deneubourg, and Guy Theraulaz. 2004. "Efficiency and robustness in ant networks of galleries". The European Physical Journal B 42(1): 123-129. doi:10.1140/epjb/e2004-00364-9

On balance theory

Heider, Fritz. 1946. "Attitudes and cognitive organization". The Journal of Psychology, 21: 107-112. doi:10.1080/00223980.1946.9917275

Cartwright, D., and Frank Harary. 1956. "Structural balance: A generalization of Heider's theory". Psychological Review, 63(5): 277-293. doi:10.1037/h0046049

Examples

net_by_richclub(ison_adolescents)
#> # Rich-club coefficient, normalized [0, 1]
#> [1] 0.833
net_by_smallworld(ison_brandes)
#> # Small-world coefficient [-1, 1]
#> [1] 0.818
net_by_smallworld(ison_southern_women)
#> # Small-world coefficient [-1, 1]
#> [1] -0.947
net_by_scalefree(ison_adolescents)
#> # Power-law exponent [1, Inf)
#> [1] 3.69
net_by_scalefree(generate_scalefree(50, 1.5))
#> # Power-law exponent [1, Inf)
#> [1] 2.21
net_by_scalefree(create_lattice(100))
#> # Power-law exponent [1, Inf)
#> [1] 3.46
# A two-mode network is bipartite by construction
net_by_bipartivity(ison_southern_women)
#> # Bipartivity, normalized [0, 1]
#> [1] 1
net_by_bipartivity(ison_adolescents)
#> # Bipartivity, normalized [0, 1]
#> [1] 0.817
net_by_meshedness(create_tree(12))
#> # Meshedness [0, Inf)
#> [1] 0
net_by_meshedness(create_lattice(12))
#> # Meshedness [0, Inf)
#> [1] 0.632
net_by_balance(to_uniplex(fict_marvel, "relationship"))
#> # Structural balance, normalized [0, 1]
#> [1] 0.668