Reputation: 177
I am using igraph
library in R to calculate the Eigenvector centrality of my network.
By using evcent
function, I am getting the result of Eigenvector centrality of my network.
But how it is being mathematically calculated and as its definition says that its algorithm is iterative.
Can any body shows a method that how it is being calculated over a network mathematically?
Let's consider that the following graph is my network and the values which i am getting as the result of eigenvector centrality how these value are being computed.
library(igraph)
g2 <- graph.formula(A:B - A:C, X:Z - X:Y - X:B, C:Z , C:X )
ec <- evcent(g2)
ec <- ec$vector
Upvotes: 1
Views: 1304
Reputation: 786
evcent, and equivalently eigen_centrality, compute the largest eigenvalue of the adjacency matrix and it's corresponding eigenvector. It uses the C routine "R_igraph_eigenvector_centrality" for a more efficient computation. For more information on the motivation behind eigenvector centrality see, for example, Social and Economic Networks. You can also compute eigenvector centrality through the built in spectral decomposition of a matrix using the eigen function in R,
library(igraph)
g2 <- graph.formula(A:B - A:C, X:Z - X:Y - X:B, C:Z , C:X )
ec <- evcent(g2)
ec <- ec$vector
ed <- eigen(as.matrix(get.adjacency(g2)))
ec2 <- ed$vectors[,1]
Note that eigen will return a normalized vector whereas evcent will not. Therefore ec2 will be a scalar multiple of ec.
Upvotes: 2