Session Ready
Exercise

Changes in PageRank

The PageRank formula \(\vec{PR}=\alpha \cdot A \cdot \vec{PR} + (1-\alpha)\cdot \vec{e}\) can be solved for \(\vec{PR}\) iteratively. In each iteration, the current value of \(\vec{PR}\) is used to compute a new value that is closer to the true value. This means that the difference between the \(\vec{PR}s\) of every two subsequent iterations becomes smaller and smaller until \(\vec{PR}\) converges to the true value and the difference becomes (almost) zero. In this exercise, you will inspect the PageRank algorithm and how it converges.

Instructions
100 XP
  • Compute one iteration with the PageRank algorithm using page.rank() with network and indicating niter=1. Extract the vector attribute and assign the result to iter1.
  • Repeat the last step with niter=2. Assign the result to iter2.
  • Compute the sum of the absolute difference between the vectors iter1 and iter2.
  • We have computed iter9 and iter10 in the same way as iter1 and iter2. Is the difference between these two iterations less than between iterations 1 and 2.