1. Learn
  2. /
  3. Courses
  4. /
  5. Predictive Analytics using Networked Data in R

Exercise

Convergence of PageRank

In this exercise, you will visually inspect how the PageRanks converge by plotting the differences of every two subsequent iterations.

Instructions

100 XP
  • Create an empty vector called value.
  • Write a for loop with 15 steps. For each step in the loop, compute the PageRank value of network with i iterations. Add the vector attribute as a column to value using cbind().
  • Compute the absolute difference between each subsequent pair of PageRank vectors in value and assign to difference.
  • Plot the difference vector to inspect the convergence of the PageRank values.