Skip to contents

Computes the vulnerability of each node, defined as the relative drop in global efficiency when that node is removed from the network.

Usage

vulnerability(
  x,
  directed = NULL,
  normalized = TRUE,
  weighted = FALSE,
  invert_weights = TRUE,
  alpha = 1,
  digits = NULL,
  ...
)

Arguments

x

Network input: matrix, igraph, network, cograph_network, or tna object.

directed

Logical or NULL. If NULL (default), auto-detect from matrix symmetry. Set TRUE to force directed, FALSE to force undirected.

normalized

Logical. If TRUE (default), return the proportional drop. If FALSE, return the raw efficiency difference.

weighted

Logical. If TRUE, edge weights are used when computing shortest paths (Dijkstra). If FALSE (default), all edges have unit length.

invert_weights

Logical. If TRUE (default) and weights are present, weights are converted to distances \(1/w^{\alpha}\), so that a higher weight gives a shorter path, as in centrality(). If FALSE, the weights are used as distances. Ignored when weighted = FALSE.

alpha

Weight-to-distance exponent (default 1). Used only when weighted = TRUE and invert_weights = TRUE.

digits

Integer or NULL. Round scores to this many decimal places. Default NULL (no rounding).

...

Passed to to_igraph, which takes no further arguments, so any argument supplied here raises an error.

Value

A data frame of class "cograph_vulnerability" with one row per node and columns:

node

Node labels.

vulnerability

Vulnerability score.

Rows are sorted by decreasing vulnerability. The original input network ("network") and the normalization mode ("normalized") are stored as attributes. Scores are NA for a network with at most one node, and all zero when the full network already has zero global efficiency.

Details

$$V(i) = \frac{E_{global} - E_{global \setminus i}}{E_{global}}$$

where \(E_{global}\) is the global efficiency of the full network and \(E_{global \setminus i}\) is the global efficiency after removing node i and all its edges.

Global efficiency is defined as:

$$E_{global} = \frac{1}{n(n-1)} \sum_{i \neq j} \frac{1}{d(i,j)}$$

In a directed network the distances follow the edge directions. \(E_{global \setminus i}\) is computed on the reduced graph with the original \(n(n-1)\) denominator, so vulnerability is never negative (Latora & Marchiori 2007).

Nodes with high vulnerability are critical to the communication efficiency of the network, because their removal causes the greatest drop in global efficiency.

All-pairs shortest paths are computed once for the full graph and once per removed node. A warning is issued for networks with more than 500 nodes.

Printing and plotting

Printing the result shows the normalization mode and the node table. plot() on the result is documented in plot-results.

References

Latora, V. & Marchiori, M. (2007). A measure of centrality based on network efficiency. New Journal of Physics, 9(6), 188. doi:10.1088/1367-2630/9/6/188

Examples

vulnerability(regulation_net)
#> Node Vulnerability (normalized)
#>        node vulnerability
#>       Adapt     0.2762887
#>     Monitor     0.2415317
#>       Share     0.2270987
#>      Create     0.2253314
#>        Plan     0.2194404
#>     Explore     0.2076583
#>     Reflect     0.1973490
#>    Evaluate     0.1885125
#>     Discuss     0.1870398
#>  Synthesize     0.1855670