View source: R/centrality-batch10.R
| centrality_local_efficiency | R Documentation |
Five node measures that other centrality packages expose and
centrality() did not. Each is a thin wrapper on
centrality.
centrality_local_efficiency(x, mode = "all", ...)
centrality_s_core(x, ...)
centrality_fragmentation(x, mode = "all", ...)
centrality_kpath(x, mode = "all", kpath_len = 3, ...)
centrality_epc(x, epc_threshold = 0.5, epc_runs = 1000, epc_seed = NULL, ...)
x |
Network input: matrix, igraph, network, cograph_network, or tna object. |
mode |
Direction: |
... |
Additional arguments passed to |
kpath_len |
Maximum path length for |
epc_threshold |
Edge removal probability. Default 0.5. |
epc_runs |
Number of percolation realizations. Default 1000. |
epc_seed |
Random seed. Default |
local_efficiency (Latora & Marchiori 2001)The global
efficiency of the subgraph induced on the node's neighbors, the node
itself removed: the mean of 1 / d_{jl} over ordered pairs of
neighbors, with distances measured inside that subgraph. Nodes with
fewer than two neighbors score 0. High values mark a node whose
neighborhood survives its loss. Matches
igraph::local_efficiency() and
brainGraph::efficiency(type = "local").
s_core (Eidsaa & Almaas 2013)The weighted k-core: the
largest strength threshold s whose maximal subgraph of nodes
with strength at least s still contains the node. Unit weights
give the k-core number exactly. Uses edge weights.
fragmentation (Borgatti 2006)Distance-weighted
fragmentation of the network after deleting the node: 1 - \sum
1/d_{ij} / ((n-1)(n-2)) over the ordered pairs that remain. Higher
means a more disruptive removal. Matches
keyplayer::fragment() on unweighted input.
kpath (Sade 1989)The number of simple paths of length at
most kpath_len (default 3) that the node lies on, endpoints
included; length 1 alone reproduces degree. Matches the per-vertex
column sums of sna::kpath.census(). Enumeration is exhaustive,
so cost grows with branching factor to the power kpath_len.
epc (Lin et al. 2008)Edge percolated component: each
edge survives with probability 1 - epc_threshold, and the
score is the mean size of the node's component over epc_runs
realizations, as a share of the network. cytoHubba and
centiserve::epc() divide by the node count alone, so their
number is epc_runs times this one; the ranking is the same.
A Monte Carlo estimate – pass epc_seed for a reproducible
value.
local_efficiency, fragmentation and kpath follow
mode; s_core and epc read the undirected skeleton.
Named numeric vector, one value per node.
Latora, V., & Marchiori, M. (2001). Efficient behavior of small-world networks. Physical Review Letters, 87(19), 198701.
Eidsaa, M., & Almaas, E. (2013). s-core network decomposition: A generalization of k-core analysis to weighted networks. Physical Review E, 88(6), 062819. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1103/PhysRevE.88.062819")}.
Borgatti, S. P. (2006). Identifying sets of key players in a social network. Computational and Mathematical Organization Theory, 12(1), 21-34.
Sade, D. S. (1989). Sociometrics of Macaca mulatta III: n-path centrality in grooming networks. Social Networks, 11(3), 273-292.
Lin, C.-Y., Chin, C.-H., Wu, H.-H., Chen, S.-H., Ho, C.-W., & Ko, M.-T. (2008). Hubba: hub objects analyzer, a framework of interactome hubs identification for network biology. Nucleic Acids Research, 36, W438-W443. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/nar/gkn257")}.
centrality_coreness,
centrality_weighted_kshell,
centrality_geodesic_kpath,
network_local_efficiency.
adj <- matrix(0, 6, 6)
adj[cbind(c(1, 1, 2, 4, 4, 5, 3), c(2, 3, 3, 5, 6, 6, 4))] <- 1
adj <- adj + t(adj)
rownames(adj) <- colnames(adj) <- LETTERS[1:6]
centrality_local_efficiency(adj)
centrality_s_core(adj)
centrality_fragmentation(adj)
centrality_kpath(adj, kpath_len = 2)
centrality_epc(adj, epc_runs = 50, epc_seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.