Eigenvector Centrality

Learn the eigenvector centrality and how to calculate it with the NetworkX library.

Definition

The degree metric defines the importance of a node by summing up how many nodes are connected to it. If edges are weighted, then we have a weighted sum.

If we look at it, each node has the same importance in the creation of the degree. What can differentiate them are the edges, but essentially, each node is treated the same. This might not be ideal for some networks. In some cases, we might want to give more importance to nodes that are connected to nodes that are more important.

For example, think about a social network. If someone has a lot of followers who never post, then this node might not be so interesting. However, a node that has a few followers, but all of them are celebrities might be way more important, even with the smaller set of nodes.

This is the type of problem we try to tackle with the eigenvector centrality measure. This measure tries to set importance to each node and then pass forward this importance to the nodes that are connected to it.

Mathematical definition

We want our metric to be influenced by the metric of its neighbors. Let’s call the eigenvector centrality xx. It’ll look something like this:

Get hands-on with 1200+ tech skills courses.