pypsa.clustering.ClusteringAccessor.busmap_by_greedy_modularity#
- ClusteringAccessor.busmap_by_greedy_modularity(n_clusters: int, buses_i: pd.Index | None = None) pd.Series #
Create a busmap according to Clauset-Newman-Moore greedy modularity maximization [CNM2004_1].
- Parameters:
n (pypsa.Network)
n_clusters (int) – Final number of clusters desired.
buses_i (None | pandas.Index, default=None) – Subset of buses to cluster. If None, all buses are considered.
- Returns:
busmap – Mapping of n.buses to clusters (indexed by non-negative integers).
- Return type:
pandas.Series
References
[CNM2004_1]Clauset, A., Newman, M. E., & Moore, C. “Finding community structure in very large networks.” Physical Review E 70(6), 2004.