The Katz Centrality

Learn the Katz centrality, an extension of the eigenvector centrality for directed graphs that solves a problem for nodes with an in-degree of zero.

A problem with eigenvector centrality

Eigenvector centrality has a nice intuition of grabbing the importance from the neighbors of a node in order to determine its importance. However, for directed graphs, we can end up with a problem when we have nodes with an in-degree equal to zero.

In the case of an in-degree of zero, the importance of that node is going to be zero (or very close to it). Therefore, it will pass a zero value for its neighbors, making their eigenvector centrality become way smaller. If a node receives a connection only for a node with zero in-degree, then this node will also be zeroed.

This phenomenon is called zero-propagation, and it is something we want to avoid. Let’s look at an example of this:

Press + to interact
A directed network that suffers from zero propagation on nodes 1, 2 and 3 because node 1 has no in-degree
A directed network that suffers from zero propagation on nodes 1, 2 and 3 because node 1 has no in-degree

Here’s how we can calculate the eigenvector centrality for this network:

Press + to interact
import networkx as nx
edge_list = [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 4)]
G = nx.DiGraph()
G.add_edges_from(edge_list)
print('Eigenvector centrality: ', dict(nx.eigenvector_centrality(G)))

Notice how the values for nodes 11, 22, and 33 are really close to zero. If we think that the importance of 44 should be related to the importance of 33, the fact that the importance of node 33 ...