diplomat.utils.clusteringΒΆ

Optimized routines for performing agglomerative clustering on weighted graphs.

Functions

get_components(merge_list, distances, ...)

Get the components or clusters of set of nodes after performing hierarchical clustering, given a specific number of desired components to be returned.

nn_chain(dists, linkage_mode)

Use the nearest neighbor chain algorithm to perform hierarchical clustering of a graph.