subgraph_centrality | R Documentation |
Subgraph centrality of a vertex measures the number of subgraphs a vertex participates in, weighting them according to their size.
subgraph_centrality(graph, diag = FALSE)
graph |
The input graph. It will be treated as undirected. |
diag |
Boolean scalar, whether to include the diagonal of the adjacency
matrix in the analysis. Giving |
The subgraph centrality of a vertex is defined as the number of closed walks originating at the vertex, where longer walks are downweighted by the factorial of their length.
Currently the calculation is performed by explicitly calculating all eigenvalues and eigenvectors of the adjacency matrix of the graph. This effectively means that the measure can only be calculated for small graphs.
A numeric vector, the subgraph centrality scores of the vertices.
Gabor Csardi csardi.gabor@gmail.com based on the Matlab code by Ernesto Estrada
Ernesto Estrada, Juan A. Rodriguez-Velazquez: Subgraph centrality in Complex Networks. Physical Review E 71, 056103 (2005).
eigen_centrality()
, page_rank()
Centrality measures
alpha_centrality()
,
authority_score()
,
betweenness()
,
closeness()
,
diversity()
,
eigen_centrality()
,
harmonic_centrality()
,
hits_scores()
,
page_rank()
,
power_centrality()
,
spectrum()
,
strength()
g <- sample_pa(100, m = 4, dir = FALSE)
sc <- subgraph_centrality(g)
cor(degree(g), sc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.