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
