threshold_clustering(g_original: object, threshold_function: Callable[[list], float] = <Mock id='139911949187088'>) → cdlib.classes.node_clustering.NodeClustering¶
Developed for semantic similarity networks, this algorithm specifically targets weighted and directed graphs.
Supported Graph Types
Undirected Directed Weighted Yes Yes Yes Parameters:
- g_original – a networkx/igraph object
- threshold_function – callable, optional Ties smaller than threshold_function(out_ties) are deleted. Example: np.mean, np.median. Default is np.mean.
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> coms = algorithms.threshold_clustering(G)
Guzzi, Pietro Hiram, Pierangelo Veltri, and Mario Cannataro. “Thresholding of semantic similarity networks using a spectral graph-based technique.” International Workshop on New Frontiers in Mining Complex Patterns. Springer, Cham, 2013.