Base
Base class for clustering algorithms
ClusterMethod
¶
ClusterResult(labels, representatives, params)
¶
The standardized output every clusterer returns.
labels
¶
dictionary with the keys being the items id (e.g. cids) and the values is their cluster id.
method
¶
The algorithm generated this result.
n_clusters
¶
Number of distinct clusters.
params
¶
The params object holding the metadata the clustering algorithm ran with.
representatives
¶
dictionary with the keys being the cluster id and the value is the id of the cluster representative id
__post_init__()
¶
clusters()
¶
Converts the labels into a dictionary of clusters with the cluster id as the key and the cluster members as the value.