Algorithm
Personalized PageRank
activeNeeds verification
PageRank whose teleport step returns to a chosen set of seed nodes, scoring relevance to those seeds; used for recommendation, local clustering and biomedical prioritisation.
Definition
Intuition
Random walks that keep restarting from your seeds; nodes they visit often are "close" to the seeds in a network sense.
Complexity
| Time | O(k (V + E)) by power iteration; local push methods are sublinear |
|---|---|
| Space | O(V) |
Python
import networkx as nx
seeds = {'disease:X': 1.0}
scores = nx.pagerank(G, alpha=0.85, personalization=seeds)Cypher (Neo4j GDS)
MATCH (d:Disease {name: 'X'})
CALL gds.pageRank.stream('kg', {sourceNodes: [d]})
YIELD nodeId, score RETURN gds.util.asNode(nodeId).name, score
ORDER BY score DESC LIMIT 20Procedure names and options vary between GDS versions; check the GDS docs for your version.
An interactive step-by-step visualizer for this algorithm is planned for phase 3.
Profile
| Time complexity | O(k (V + E)) by power iteration; local push methods are sublinear |
|---|---|
| Space complexity | O(V) |