Hoosier-Clusters / clusim

An extended package for clustering similarity
MIT License
63 stars 15 forks source link

Add constructor of Clustering from class labels #40

Closed jg-you closed 2 years ago

jg-you commented 2 years ago

This would allow the use of clusim as a drop-in replacement for many sklearn.metrics functions.

Not a general constructor, though, since it can't handle overlap or hierarchies.

Related to this PR: it would be fairly easy to add @classmethod decorators to all the .from_X methods to allow a slightly more straightforward initialization as:

clu = Clustering.from_cluster_labels(labels)

instead of the current

clu = Clustering()
clu.from_cluster_labels(labels)
yy commented 2 years ago

Thanks!! @jg-you