Community detection


Do not manually instantiate this class using the class constructor. Instantiate the class using the method noesis.Noesis.create_community_detector().

class noesis.communities.CommunityDetector(detector, *args)

This class implements the interface for community detectors. These algorithms find groups of densely connected nodes.

  • detector (string) – Technique used for community detection. Currently supported techniques are: - Hierarchical agglomerative: ‘SingleLink’, ‘AverageLink’, and ‘CompleteLink’. - Hierarchical divisive: ‘NewmanGirvan’ and ‘Radicchi’. - Modularity-based: ‘FastGreedy’ and ‘MultiStepGreedy’. - Partitioning-based: ‘KernighanLin’ and ‘KMeans’. - Spectral: ‘UKMeans’, ‘NJW’, and ‘EIG1’. - Overlapping: ‘BigClam’.
  • args (parameters) – Parameters for the community detector. These parameters are specific for each algorithm and more details are provided in NOESIS documentation.

Compute node communities for a given network.

Parameters:network (Network) – Network for which the communities will be computed.
Returns:communities – A list of integers indicating the community that each node belongs to.
Return type:list of integers