The PageRank algorithm can be implemented with an iterative process where, at each iteration, the rank of a given node is updated based on the rank of its neighbors in the previous iteration. This process is repeated until the algorithm converges, meaning that the PageRank difference between two iterations is lower than a certain threshold. In order to understand how it works, we are first going to run it manually on the simple graph we studied in the Degree centrality section.
In order to compute PageRank, we need an outgoing degree for each node, which is simply the number of arrows starting from the node. In the graph illustrated in the preceding diagram, these degrees are as follows:
A => 2
B => 1
C => 1
D => 1
In order to run the PageRank algorithm (in its iterative form), we need to give an initial value to the rank of each node. Since we do not have any a priori preference for a given node, we can initialize these values with the...