Li and Huang's MCGM combines degree k, core number s and eigenvector centrality x in node masses. Write K, S and X for these features divided by their respective global maxima. Equations 17 and 18 define \(\alpha=\max\{\operatorname{median}(K), \operatorname{median}(X)\}/\operatorname{median}(S)\), \(m_i=K_i+\alpha S_i+X_i\), and \(MCGM_i=\sum_{j:0<d(i,j)\le R}m_i m_j/d(i,j)^2\). The default radius two is the paper's recommended practical setting. All features refer to the original graph, not each node's neighborhood.
Arguments
- x
Network input accepted by
centrality.- mcgm_radius
Nonnegative hop-distance cutoff, default two. NULL or infinity includes every reachable partner. Fractional cutoffs include exactly the integer hop distances not exceeding them.
- mcgm_alpha
NULL uses the published median-based coefficient. A finite nonnegative scalar explicitly overrides it.
- ...
Additional arguments to
centrality.
Details
The source domain is simple undirected unweighted graphs. Other inputs use their simple undirected skeleton: either arc creates one edge, parallel edges count once and loops are removed. Weights, mode, cutoff, gravity_mass, gravity_radius and path-weight inversion are ignored. These input projections are cograph conventions.
On connected graphs with edges, X is the unique positive Perron vector, scaled to maximum one. For disconnected graphs the paper does not specify an eigenvector selection. This implementation projects the all-ones vector onto the global dominant eigenspace and then scales to maximum one. Equivalently, it selects the limit of identity-shifted power iteration initialized uniformly. Components below the largest spectral radius have eigenvector feature zero; tied components share the projection. Component roots within 64 times machine epsilon times n times max(1, spectral radius) are treated as tied. All feature maxima and medians remain global. Adding a disconnected component can change scores.
When edges exist but median coreness is zero, the source's automatic
alpha is undefined and an error requests an explicit mcgm_alpha.
This override is an extension of the published adaptive rule; setting
it to one recovers equation 16. It is never silently inferred from a
different subset of nodes. Isolates score zero when the mass rule is
defined. Edgeless graphs and radii below one return zero by an explicit
empty-interaction convention, including a singleton; empty graphs return
no scores. NULL or infinite radius includes all reachable partners.
Raw scores preserve equation 18's scale. Optional maximum normalization occurs after all gravity contributions and can handle very large explicit alpha values whose raw scores overflow. Dense spectral calculations and all-pairs distances require O(n cubed) time and O(n squared) memory. Unresolved positive eigenvectors or overflowing raw scores raise errors. The published nine-node numerical example is reproduced at its printed precision. This establishes numerical agreement, not a universal guarantee of spreading prediction or parity with unreleased author software.
References
Li, Z. and Huang, X. (2022). Identifying influential spreaders by gravity model considering multi-characteristics of nodes. Scientific Reports, 12, 9879. Equations 17-18, Algorithm 1, Tables 1-2. doi:10.1038/s41598-022-14005-3 .
