cdlib.algorithms.agdl¶
- cdlib.algorithms.agdl(g_original: object, number_communities: int, kc: int) NodeClustering ¶
AGDL is a graph-based agglomerative algorithm, for clustering high-dimensional data. The algorithm uses the indegree and outdegree to characterize the affinity between two clusters.
Supported Graph Types
Undirected
Directed
Weighted
Yes
Yes
Yes
- Parameters:
g_original – a networkx/igraph object
number_communities – number of communities
kc – size of the neighbor set for each cluster
- Returns:
NodeClustering object
- Example:
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> com = algorithms.agdl(g, number_communities=3, kc=4)
- References:
Zhang, W., Wang, X., Zhao, D., & Tang, X. (2012, October). Graph degree linkage: Agglomerative clustering on a directed graph. In European Conference on Computer Vision (pp. 428-441). Springer, Berlin, Heidelberg.
Note
Reference implementation: https://github.com/myungjoon/GDL