LeidenResult
Models & Types · AiDotNet.RetrievalAugmentedGeneration.Graph.Communities
Contains the results of Leiden community detection, including hierarchical partitions.
For Beginners
The Leiden algorithm produces a hierarchy of communities:
- Level 0: Finest partition — each node belongs to a small community
- Level 1: Coarser — small communities merged into bigger ones
- Level N: Coarsest — entire graph in a few large communities
The Communities dictionary gives the final (finest) partition: mapping each node ID to its community ID.
Constructors
| Constructor | Summary |
|---|---|
LeidenResult() |
Properties
| Property | Summary |
|---|---|
Dictionary<string, int> Communities { get; set; } |
Final community assignments: nodeId → communityId (finest level). |
List<Dictionary<string, int>> HierarchicalPartitions { get; set; } |
Hierarchical partitions: level → (nodeId → communityId). |
List<double> ModularityScores { get; set; } |
Modularity score at each level of the hierarchy. |