Arcana.Graph.CommunityDetector.Leiden (Arcana v1.2.0)
View SourceLeiden algorithm implementation for community detection.
Uses the ExLeiden library to detect communities in entity graphs. The Leiden algorithm is a refinement of the Louvain algorithm that guarantees well-connected communities.
Usage
detector = {Arcana.Graph.CommunityDetector.Leiden, resolution: 1.0}
{:ok, communities} = CommunityDetector.detect(detector, entities, relationships)Options
:resolution- Controls community granularity (default: 1.0) Higher values produce smaller communities:max_level- Maximum hierarchy levels (default: 3)
Summary
Functions
Converts relationships to weighted edge tuples for ExLeiden.