liveBook · Manning

PPR

As explained in Graph Algorithms for Data Science

Personalized PageRank is a PageRank variation that biases random restarts toward specified source nodes.

Personalized PageRank measures influence from a chosen point of view. Instead of teleporting to arbitrary nodes, the random surfer restarts at specified source nodes, such as users who registered in 2016 or NASA. section 5.4.2 section 5.6

A typical Neo4j GDS workflow is:

  • Match the nodes defining the viewpoint and collect them into a sourceNodes list. section 5.4.2
  • Run gds.pageRank.stream on the projected follower network with the sourceNodes parameter. section 5.4.2
  • Map returned nodeId values to nodes, sort by score, and inspect the highest-ranked users. section 5.4.2

Viewing the network through 2016 registrants

Using users registered in 2016 as restart nodes ranks Elon Musk first, followed by Andrew Ng, Ian Goodfellow, Hugging Face, and NASA. Several accounts become more important than in overall PageRank because the viewpoint changes. section 5.4.2

Listing 5.14 Running the personalized PageRank algorithm from the point of view of users who registered in 2016
MATCH (u:User)
WHERE u.registeredAt.year = 2016
WITH collect(u) AS sourceNodes                             #1
CALL gds.pageRank.stream('follower-network', {sourceNodes: sourceNodes})
YIELD nodeId, score                                        #2
RETURN gds.util.asNode(nodeId).username AS user, score
ORDER BY score DESC
LIMIT 5;                                                   #3

Executable Cypher demonstrates collecting source nodes, streaming personalized PageRank, mapping node IDs, and returning the top scores. section 5.4.2

How Graph Algorithms for Data Science covers it

How deep it goes
Explains biased restarts, source-node collection, streamed results, node-ID mapping, and score interpretation.
Examples
Uses 2016 registrants and NASA as source nodes, ranking users including Elon Musk, Andrew Ng, and ServerlessFan.
What you can do after
Operate personalized PageRank through Neo4j GDS and interpret rankings from a selected network viewpoint.
How it connects
Connects personalized PageRank to PageRank, damping factor, teleportation, and projected graphs.

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.