PageRank Algorithm

This script implements the PageRank algorithm which can be used to find the importance of nodes in a graph.

The algorithm works by initially assigning each node in the graph a default rank value (say 1/N, where N is the number of nodes in the graph). Then we change the value of the rank of each node by saying that the pagerank of a node is equal to the sum of the pageranks of the nodes that link to it over their respective magnitudes.

More precisely,

To ensure that the hubs do not dominate the graph, we also introduce a damping factor (which is normally set to 0.85) and so the equation becomes
Rank(i) = (damp / size) + (1 - damp) * Rank*(i)

Show Work?
your browser does not support the canvas tag