Welcome to ModularityPruning’s documentation!
ModularityPruning is a pruning tool to identify small subsets of network partitions that are significant from the perspective of stochastic block model inference.
This method works for single-layer and multi-layer networks, as well as for restricting focus to a fixed number of communities when desired.
Additional information can be found in the journal article at https://doi.org/10.1038/s41598-022-20142-6 or the article’s significantly more detailed Supplementary Information.
Prior to version v1.3.0, we used the Louvain algorithm for modularity maximization instead of Leiden. The deprecated
module modularitypruning.louvain_utilities now shims single-layer functions to their corresponding Leiden versions
in modularitypruning.leiden_utilities (though it still contains the legacy multi-layer functions since they can be
faster in general – leidenalg does not efficiently implement multilayer optimization).