Skip to content
All apps

PageRank

About this app

Build your own link graph, view the transition matrix live, and let the random surfer wander through the graph step by step (also backward or tenfold) — the PageRank values visibly converge, with interpretation.

The idea behind PageRank

PageRank models the web as a directed graph traversed by a “random surfer”. With probability d the surfer follows a random outgoing link, with probability 1 − d they jump to any page. A page’s PageRank is the long-run probability of finding the surfer there. It is computed by power iteration: p′[j] = (1 − d)/n + d · Σᵢ p[i] · P[i][j]. The damping factor, often d = 0.85, keeps dead ends and cycles from trapping the walk and makes the solution unique.

What you see

An example graph of nodes and arrows, where each circle’s size shows its current PageRank. Moving dots simulate the surfer at each step. A matrix panel shows the transition probabilities transposed, so each column is the distribution of one source node; nodes without outgoing arrows are marked. The PageRank panel names the leading and the last node and reports whether the distribution has settled.

Things to try

Add nodes and draw edges by clicking the source node, then the target; clicking an arrow deletes it. Step forward, back, or ten steps at once and watch Δ shrink. Change the damping factor d and compare the results. Notice how a node rises in rank when an already important node links to it.

Frequently asked questions

How does the PageRank algorithm work?
PageRank scores the nodes of a link graph by how often a random surfer visits them in the long run. A link passes on part of the linking page’s importance, split across all of its outgoing links. The vector is computed iteratively until it barely changes.
What is the damping factor in PageRank?
The damping factor d is the probability of following a link; with probability 1 − d the surfer jumps to a random node. This keeps the surfer from getting stuck in dead ends or closed cycles and makes the stationary distribution unique. A common value is 0.85.
What does PageRank have to do with eigenvectors?
The PageRank vector is the stationary distribution of a Markov chain and therefore an eigenvector of the (damped) transition matrix with eigenvalue 1. Power iteration repeatedly multiplies a start vector by this matrix and converges towards that eigenvector.
What can I do in this app?
You build your own graph of nodes and arrows, set the damping factor and let the random surfer move step by step, backwards or ten steps at a time. The matrix updates live and a line of text tells you whether the values have converged. In this app, nodes without outgoing arrows keep their probability on themselves.

Subject: Machine Learning

More from Machine Learning

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps