cdlib.algorithms.lswl_plus¶
- cdlib.algorithms.lswl_plus(g_original: object, strength_type: int = 1, merge_outliers: bool = True, detect_overlap: bool = False) NodeClustering ¶
LSWL+ is capable of finding a partition with overlapping communities or without them, based on user preferences. This method can also find outliers (peripheral nodes of the graph that are marginally connected to communities) and hubs (nodes that bridge the communities)
Supported Graph Types
Undirected
Directed
Weighted
Yes
No
Yes
- Parameters:
g_original – a networkx/igraph object
strength_type – 1 strengths between [-1,+1] or, 2 strengths between [0,1]. Default, 2.
merge_outliers – If outliers need to merge into communities. Default, True.
detect_overlap – If overlapping communities need to be detected. Default, False
- Returns:
NodeClustering object
- Example:
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> coms = algorithms.lswl_plus(G)
- References:
Fast Local Community Discovery: Relying on the Strength of Links (submitted for KDD 2021)
Note
Reference implementation: https://github.com/mahdi-zafarmand/LSWL