View source: R/centrality-batch11.R
| centrality_gravity | R Documentation |
Gravity centrality (Ma et al. 2016) treats node masses as attracting
each other with a force that falls with the squared hop distance, summed
over the nodes within a radius r:
G(i) = \sum_{j:\, 0 < d_{ij} \le r} \frac{m_i m_j}{d_{ij}^2}.
The default uses the k-shell index as mass and r = 3 (Ma et al.
2016). Degree mass without truncation is the gravity model of Li et al.
(2019, eq. 1), and degree mass with gravity_radius = "auto" is
their local gravity model (eq. 2).
centrality_gravity(
x,
mode = "all",
gravity_mass = "kshell",
gravity_radius = 3,
...
)
x |
Network input accepted by |
mode |
Direction for directed networks: |
gravity_mass |
Node mass: |
gravity_radius |
Largest hop distance included: a number (default
3), |
... |
Further arguments to |
Distances are hop counts, so edge weights are ignored. mode sets
the direction of both the distances and the degree or k-shell masses,
and mode = "all" treats edges as undirected. The "auto"
radius is half the mean finite positive distance, rounded to the nearest
integer with a minimum of 1 (Li et al. 2019, eq. 5). A radius below 1
gives a score of 0 for every node. gravity_mass = "legacy" with
gravity_radius = NULL computes
\sum_j k_j s_j / d_{ij}^2, with k_j
the degree, s_j the k-shell index and no mass on the focal node.
This form differs from the formula of Li et al. (2019).
A named numeric vector with one score per node, in input node order.
Ma, L.-L., Ma, C., Zhang, H.-F., & Wang, B.-H. (2016). Identifying influential spreaders in complex networks based on gravity formula. Physica A, 451, 205-212.
Li, Z., Ren, T., Ma, X., Liu, S., Zhang, Y., & Zhou, T. (2019). Identifying influential spreaders by gravity model. Scientific Reports, 9, 8387.
centrality_extended_gravity,
centrality_coreness, centrality.
centrality_gravity(regulation_net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.