cluster¶
Import in python using from mcutils.scripts.parcel.cluster import cluster
-
mcutils.scripts.parcel.cluster.
cluster
(similarity, method='spectral', n_clusters=10, **kwargs)[source]¶ Cluster based on a similarity graph
- Parameters
similarity – (N, N) sparse similarity matrix
method – clustering method (‘spectral’, ‘affinity’, or ‘DBSCAN’)
n_clusters – number of clusters
- Returns
(N, ) integer array of labels