liveBook · Manning

PageRank

As explained in Graph Algorithms for Data Science

PageRank is a graph algorithm that estimates the importance of nodes from the structure of incoming relationships and their transitive influence.

PageRank estimates a node’s directional, transitive influence. Unlike a direct follower count or node degree, it considers not only how many incoming relationships a node has, but also how influential those connected nodes are. In a follower network, a follow from a highly connected account contributes more influence than a follow from an ordinary account. section 2.3.1 section 5.4.1

Treat each directed relationship as a vote for the node it points to. Start every node with an equal score of 1 divided by the node count. On each iteration, a node divides its current score among its outgoing relationships; each node then sums the scores arriving through incoming relationships. Repeat until scores converge or a chosen iteration limit is reached. section 5.4.1

Figure 5.18 Simplified PageRank calculation based on network flow
05-18

The network-flow diagram makes the iterative transfer of rank across directed relationships visible. section 5.4.1

A node with no outgoing relationships is a dead end: it would leak rank from the network in the simplified calculation. PageRank avoids this with teleportation, a small probability that a random surfer jumps to a random node instead of following an outgoing relationship. The damping factor controls how often the surfer follows a link; with the default 0.85 setting, nodes with no incoming relationships receive 0.15. section 5.4.1 section 5.6

Rank influential accounts

Run PageRank on a projected follower network and write each result to a node property. The highest scores identify accounts with influential followers, not merely large raw follower totals. Inspect the leading accounts’ own highest-ranking followers to interpret why they rank highly. section 5.4.1 section 5.4.1

Listing 5.12 Executing PageRank on the followers network
CALL gds.pageRank.write('follower-network',
 {writeProperty:'followerPageRank'})

This Cypher call runs PageRank on the follower-network projection and persists scores as followerPageRank. section 5.4.1

Use PageRank where influence must flow through a suitable graph structure:

  • Rank content creators with the weighted PageRank variant after projecting a network and excluding self-loops. section 6.3
  • Find important hashtags only after converting tweet–hashtag data into a monopartite co-occurrence network; a bipartite graph does not let influence flow appropriately between same-type nodes. section 7.0
  • Select a few representatives from a large label-propagation community by filtering its subgraph and ranking its nodes separately. section 7.5
  • Use Personalized PageRank when teleportation should begin from specified nodes, producing a point-of-view-specific ranking. section 5.6

How Graph Algorithms for Data Science covers it

How deep it goes
Explains iterative score flow, dead ends, teleportation, damping, and executable Graph Data Science calls without formal proof.
Examples
Uses Twitter followers, ranked accounts and followers, weighted content-creator ranking, and hashtag-community representatives.
What it assumes
Assumes a Neo4j instance with imported Twitter network data and introduces PageRank through directed follower relationships.
What you can do after
Apply it via Neo4j Graph Data Science to rank nodes, inspect score drivers, and select community representatives.
How it connects
Connects PageRank to node degree, follower networks, damping factors, Personalized PageRank, bipartite networks, and label propagation.

Also explained in

Compare how 3 books explain PageRank →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Algorithms for Data Science. The section links point to the parts of the book it draws on.