Skip to main content

pagerank

Function pagerank 

Source
pub fn pagerank(
    graph: &KnowledgeGraph,
    top_n: usize,
    damping: f64,
    max_iterations: usize,
) -> Vec<PageRankNode>
Expand description

Compute PageRank importance scores for all nodes.

Returns the top top_n nodes sorted by PageRank score descending. Uses the power iteration method with configurable damping factor (default 0.85).