Skip to main content

cluster

Function cluster 

Source
pub fn cluster(graph: &KnowledgeGraph) -> HashMap<usize, Vec<String>>
Expand description

Run community detection on the graph. Returns {community_id: [node_ids]}.

Uses the Leiden algorithm: greedy modularity optimization (Louvain phase) followed by a refinement phase that ensures communities are internally well-connected.