Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HierarchicalLouvain ¶
HierarchicalLouvain runs Louvain at multiple levels. Returns a slice of levels, each level is a map nodeID → communityLabel.
func Louvain ¶
Louvain runs the Louvain community detection algorithm. Returns a map from node index → community ID (integer).
Uses the standard modularity gain formula:
ΔQ = [k_i_in / (2m)] - [sigma_tot * k_i / (2m²)]
where:
- k_i_in = sum of edge weights from node i to nodes in community C
- sigma_tot = sum of all edge weights incident to nodes in community C
- k_i = weighted degree of node i
- m = total edge weight of the graph
Types ¶
type CommunityReport ¶
CommunityReport holds LLM-generated community metadata.
Click to show internal directories.
Click to hide internal directories.