cdlib.algorithms.slpa¶
-
slpa
(g_original: object, t: int = 21, r: float = 0.1) → cdlib.classes.node_clustering.NodeClustering¶ SLPA is an overlapping community discovery that extends tha LPA. SLPA consists of the following three stages: 1) the initialization 2) the evolution 3) the post-processing
Supported Graph Types
Undirected Directed Weighted Yes No No Parameters: - g_original – a networkx/igraph object
- t – maximum number of iterations, default 20
- r – threshold ∈ [0, 1]. It is used in the post-processing stage: if the probability of seeing a particular label during the whole process is less than r, this label is deleted from a node’s memory. Default 0.1
Returns: NodeClustering object
Example: >>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> coms = algorithms.slpa(G, t=21, r=0.1)
References: Xie Jierui, Boleslaw K. Szymanski, and Xiaoming Liu. Slpa: Uncovering overlapping communities in social networks via a speaker-listener interaction dynamic process. Data Mining Workshops (ICDMW), 2011 IEEE 11th International Conference on. IEEE, 2011.
Note
Reference implementation: https://github.com/kbalasu/SLPA